Myeclipse default encoding is GBK, JS file default encoding is ISO-8859-1.
To utf8:
1. Windows-> preferences... open the "Preferences" dialog box, left navigation tree, navigate to general-> workspace, right text file encoding, select other, change to UTF-8, text file encoding in its properties dialog box is the UTF-8.
2. Windows-> preferences... open the "Preferences" dialog box, navigate to General> content types in the left navigation tree, select context types on the right, open text, and select Java source file, enter the UTF-8 in the following default encoding input box, and click Update to set the Java file encoding to UTF-8. Other files related to Java application development, such as properties and XML, have been specified by myeclipse by default, respectively for ISO8859-1, UTF-8, such as development needs to change the encoding format can be specified here.
3. After the above two steps, the new Java file is UTF-8 encoding, myeclipse compilation, running, debugging is no problem, but the RCP application product output, or plug-in output, there is always an error. Either the compilation fails (compile must be re-compiled during output), or the Chinese characters are garbled during the running of the output plug-in. Now you need to add a line in the build. Properties of the RCP application, or plug-in Plug-in project, javacdefaultencoding .. = UTF-8. Let the output compile know the UTF-8 encoding for the Java source file. This setting needs to ensure that all Java source files are in UTF-8 encoding format, if not all, you can refer to myeclipse help (plug-in development environment guide> reference> feature and plug-in build configuration), it is recommended that all Java source files are UTF-8 encoding.
If the plug-in development, RCP application development based on other encoding, such as gb18030, want to convert to UTF-8, first, do the above work; then through the search encoding conversion tool, for example, based on the iconv batch conversion tool, convert the original encoding to UTF-8 encoding, note that only the conversion of Java source files, other types of files may already be more appropriate encoding; change text file encoding from the original project property to the UTF-8.