Reference URL: http://blog.sina.com.cn/s/blog_8999d1c60102wtfk.html
Https://www.cnblogs.com/susuyu/archive/2012/06/27/2566062.html
It is necessary to code a unified project before starting the project (UTF-8 can support internationalization most)
One, the global encoding settings 1, the Global workspace encoding format, sets the default encoding format of the workspace file, that is, the file save format (contains very visible types of files); console display the encoding used is the character encoding format that inherits the workspace setting.window-->preferences-->general-->workspace-->text file Encoding, select Other, change to UTF-8, The text file encoding in the Properties dialog box for the newly created project is UTF-8.2, set the default encoding format of the new common type file, that is, the file saving formatwindows-->preferences-->general-->content Types, click each subkey in the text and enter "UTF-8" in, point update! Other Java application development related files such as: properties, XML, etc. have been specified by the Eclipse default, respectively, Iso8859-1,utf-8, such as the development of the need to change the encoding format can be specified here. 3, specify the MyEclipse writing file page content data encoding format (in fact, the default setting of parameters), mainly to inform the browser or server, the transmission of data encoding format. When creating a new JSP file, contenttype= "text/html; Charset=utf-8 "pageencoding=" UTF-8 "will be generated automatically, without having to manually change it every time."
When creating a new HTML file, http-equiv= "Content-type" content= "text/html; Charset=utf-8 "
When creating a new XML file, <?xml version= "1.0" encoding= "UTF-8"?>Window->preference->myeclipse->files and Editors, change the "Encoding" of each subkey to "ISO 10645/unicode (UTF-8)", Point apply! 4, after the above three steps, the new Java file is UTF-8 encoding, Eclipse compile, run, Debug no problem. Second, the local code to set a single file or a single project to view the encoding format (that is, open the file in the encoding format) Change 1. Test.javaRight-click-->properties-->resource on the right-hand text file encoding->other (UTF-8\GBK)
2. Right-click on the source-->general-->editors-->test editors-->spelling-->encoding.
MyEclipse Setting the Encoding method