Edit the properties file in eclipse

Source: Internet
Author: User
Quote:
Today, when I used eclipse3.1m4 to edit the properties file in my project, I found that the Chinese characters in the file were garbled and I found out: with this function, file encoding is determined by content by default. It seems to have started with version 3.0.1. The encoding settings for this file are added to the attributes of each file, most files are inherited from the container by default,
The encoding attribute in the XML file is read by default for the XML file to determine the encoding of the file.
For properties files, the iso-8859-1 is used by default for editing.
The former is very convenient, and the latter is troublesome for a large number of GBK-Encoded chinese resouce properties files in our system. After opening these files in the default encoding mode, all Chinese characters are garbled, define the text file encoding as gbk in the properties of one file
I can't find any option in eclipse to change the default encoding method.
Although JDK to read resources must be iso-8859-1 encoding, but for the project file we want to edit is to be able to directly display the Chinese GBK, then use native2ascii to convert to the build folder to deploy
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.