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 encoding for the Eclipse workspace (workspace) is the default encoding for the operating system, and the default code 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 also GB18030.
The default encoding for new projects for Eclipse is GBK, which modifies the eclipse's configuration so that the default encoding of the new project for Eclipse is directly UTF-8 on the menu bar window->preferences->general-> Workspace->text file encoding change it to UFT-8. This is one of the things that should be done immediately after installing Eclipse. However, this modification is only valid for the current workspace, and the same steps are needed if you create a new or switch to a workspace.
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 up?
1. Text file encoding, WORKSPAC, Preferences, window, windows
Select other to change the encoding to UTF-8 so that the text file encoding in the Properties dialog box for the newly created project is UTF-8.
2. Content Types, window, Preferences, Windows
Select the text tree, click Open, select Java Source file, enter UTF-8 in the default encoding input box below, press the Update button, then 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.) )
Eclipse encoding Format tutorial, how do I set the encoding format for eclipse?