There are several ways to set the encoding:
1.window-preferences-general-workspace
2.window-preferences-general-editors-text editors-spelling
3. Right-click the corresponding project or file in the left Package explorer-properties-resource
4.window-preferences-general-content Types
5.Myeclipse Enterprise workbench-files and editors-jsp ...
6. Configure Tomcat encoding, server.xml add uriencoding= "Utf-8" in the tomcat\conf directory. As follows:
<connector port= "8080" protocol= "http/1.1" connectiontimeout= "20000"
redirectport=
"8443" uriencoding= "Utf-8"/>
Experiment: Priority from high to low is 3-1-2
The highest is to specify the encoding in the file, such as the encoding of the file specified in the XML file, in the JSP page.
Note: (1) window-preferences-general-content types also has the option to set the encoding. This is where the encoding is set from the angle of the file type, and the files with different suffix names are encoded
(2) ANSI (ISO-8859-1) to utf-8 conversion Normal, utf-8 to ANSI is a problem (recommended to open the Notepad++,myeclipse,dreamweaver, see if there are problems)
(3) The Java Web Project can also control the encoding by configuring the filter. Reference: http://blog.csdn.net/lovesummerforever/article/details/9924413