The problem of solving Chinese characters garbled is broadly divided into the following types:
1.jsp header set Pageencoding to "Utf-8"
2..jsp header Settings contenttype= "Text/html;charset=utf-8"
3.Window >>> Preferences >>> Workspace Workspace Setup encoding format: UTF-8
4.Window >>> Preferences >>> General >>> Content Types >>> Text setting encoding formats for various types of files
5. Right-click Resource Project Properties >>> Resource resource File Settings UTF-8
6.Tomcat conf files in the Server.xml file, in the <Connector> node, you can modify the encoded character format uriencoding= "UTF-8"
7. Set the character encoding in the Web. xml file in the project file web-inf directory file
<jsp-config>
<jsp-property-group>
<url-pattern>*.html</url-pattern>
<page-encoding>UTF-8</page-encoding>
</jsp-property-group>
</jsp-config>
8.
9. Declarations in HTML are written to <meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
10. By request.setcharacterencoding ("UTF-8"); Sets the encoding format for the character stream of the requested output
11. Use of Response.setcontenttype ("Text/html;charset=utf-8"); Sets the character encoding format of the response, which controls the browser decoding with UTF-8
12. Use Response.setheader ("Content-type", "text/html;charset=utf-8"); Tell the browser to parse with Utf-8
13. Get string strings, via new string (variable name. GetBytes ("Iso-8859-1"), "UTF-8"); Converts a character to a binary array constructs a new string using the specified character encoding
14. Write the DAO configuration file. What database name does the properties need to access in the URL? Characterencoding=utf-8 setting the specified character encoding
14 ways to solve Web character encoding problems