If you want to enable plug-in development applications to have better internationalization support, to maximize the support of Chinese output, it is best to make Java files using UTF-8 encoding. However, the default character encoding for the Eclipse workspace (workspace) is the operating system default encoding, and the default encoding for the Simplified Chinese operating system (Windows XP, Windows 2000 Simplified Chinese) is GB18030, The engineering code established in this workspace is GB18030, and the Java file created in the project is GB18030.
The eclipse default code for new projects is GBK, which modifies the configuration of Eclipse to make the default encoding of Eclipse's new project directly UTF-8 the menu bar window->preferences->general-> Workspace->text file encoding changes it to UFT-8. This is one of the things that should be done immediately after you install eclipse. But this modification is only valid for the current workspace, and if you are new or switched to a new workspace, you have to do the same step.
If you want to enable plug-in development applications to have better internationalization support, to maximize the support of Chinese output, it is best to make Java files using UTF-8 encoding.
So how do you set it?
1. Window-> Preferences-> general-> Workspac-> Text file encoding
Select other to change the encoding to UTF-8 so that the text file encoding in the Properties dialog box for the new project is UTF-8.
2, Window-> Preferences-> general-> Content Types
Select the text tree, click Open, select Java Source file, enter UTF-8 in the default encoding input box below, and press the Update button to set the Java file encoding to UTF-8.
(Note: 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 also be specified here.) )