In the Eclipse development, many file encodings are iso-8859-1 by default and do not support Chinese (such as commonly used JSPs). In this way, each time we build a file to manually change the code, in fact, we can set the default encoding file, in the future, we will not need to modify the code every time,
UTF-8
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. If you want to make the new project, Java files directly to UTF-8, you need to do the following:
1. Windows->preferences ... Open the Preferences dialog, navigate to the left navigation tree, navigate to General->workspace, right text file encoding, select Other, change to UTF-8, and later create a new project in its Properties dialog box, text file Encoding is the UTF-8.
2. Windows->preferences ... Open the Preferences dialog box, navigate to the left navigation tree, navigate to general->content Types, right context Types tree, point to each subkey in 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.
Encoding format settings for Eclipse