[Reprint]eclipse in the encoding format of the file is Utf-8

Source: Internet
Author: User



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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.