首页 > 代码库 > Character Encoding tomcat.

Character Encoding tomcat.

default character encoding of the request or response body:

  If a character encoding is not specified, the Servlet specification requires that an encoding of ISO-8859-1 is used.

  For JSP pages,The request character encoding handling is the same,for JSP pages in standard syntax the default response charset is the usual ISO-8859-1, but for the ones in XML syntax it is UTF-8.

 

Default encoding for GET

  Many browsers are starting to offer (default) options of encoding URIs using UTF-8 instead of ISO-8859-1.

  HTML 4.0 recommends the use of UTF-8 to encode the query string.

Default Encoding for POST

  ISO-8859-1 is defined as the default character set for HTTP request and response bodies in the servlet specification

ref:  http://wiki.apache.org/tomcat/FAQ/CharacterEncoding