Already a GBK encoded eclipse written by the project how to go to UTF8 without garbled

Source: Internet
Author: User

Garbled: Eclipse in Project (GBK) import package (Utf-8)

Many files, write the program to traverse the file, read the contents of the file, transcoding, store to a new location.
If the file is small, copy it manually.

Workaround: 1, Manual copy.

(1) The package encoding to GBK, the error Java file to utf-8,copy to GBK encoding.

(2) The project file is opened with Utraedit, then saved as UTF8 type without BOM information, which ensures the transcoding succeeds
If you have trouble, you can use the bulk transcoding tool to convert

3, we are programmers ah, write a method of their own. Bulk transcoding java program (ask Bright elder brother)
Traverse the file, GBK read, UTF8 write,

Second: If the other items do not have garbled problem, but the individual items appear garbled, then we do not need to set the work space coding, only need to modify the code of the project.

When the item is selected, right-click and click Properties in the Pop-up menu.

In the pop-up Properties window, select Resources (Resource)--click Select Other, then select the encoding format you want.

Three: Only the individual files appear garbled, then set the encoding format of individual files can solve the problem. Select the file that has garbled characters, and then right-click.

In the pop-up menu, select Properties.

Select the resource in the pop-up Properties window and click Other to set the encoding for individual files.

Precautions
    • If you modify the encoding of the workspace, the other items are affected, the encoding of the project is modified, the other files are affected, and the file is encoded in a way that changes the file.
    • Display Chinese all the encoding method is mainly GBK and Utf-8,utf-8 is the international standard of Chinese encoding, recommended to use.
    • Http://www.cnblogs.com/bluestorm/archive/2012/09/20/2695567.html

Already a GBK encoded eclipse written by the project how to go to UTF8 without garbled

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.