Disclaimer:
This article transfers from the network article, reproduced this article only for the personal collection, shares the knowledge, if has the infringement, please contact the blogger to delete.
Original Ryxxlong
Original address: http://ryxxlong.iteye.com/blog/788469
1. You can configure the value of the text file encoding property under the workspace key in eclipse to determine the encoding properties of the document for all Eclipse projects under this work interval. Window-->preferences-->general-->workspace, the property value for configuring the text file encoding under Workspace is other, select "Utf-8" in other, with After the reset, click OK to save.
The document encoding for this Eclipse new project will be utf-8. The configuration looks like this:
2. At this point, after you create a new project, right-click on the project name and select the Properties option in the popup menu (or open any file and then use the shortcut key alter + ENTER to view), you can see that your project file is UTF-8 encoded by default, as shown in:
If you do not configure the first step, your text file encoding value should be inherited from container (GBK), at this point you can choose other: in the value of other select Utf-8 to set your current project's document encoding to Utf-8 (if you have created a lot of files in this project, because the files you have created are GBK encoded, and then changed to utf-8 encoding, can cause garbled, please note).
Ps:
Also note the change in the encoding of individual files, refer to the documentation:
Http://www.cnblogs.com/sdjnzqr/p/3804420.html in the "3. Set character sets, set the character set of Jsp,java,js,css and other files to the format required by your system to prevent garbled characters . "section