Eclipse Chinese Comment garbled solution

Source: Internet
Author: User

when importing someone else's project or Java file into your eclipse, it is often the case that the Chinese comment of the Java file becomes garbled, mainly because someone else's IDE encoding format differs from your own Eclipse encoding format.

Summarize the online suggestions and their own experience, you can refer to the following several solutions:

1 changing the encoding format of the entire file type

1) eclipse->window->preferences->general->content Types
2) Find the type of file to be modified (java,jsp, etc.), there is a default encoding below, enter GBK in the input box
3) Click Update
4) Click OK
5) Restart Eclipse

2 changing the encoding format for the entire Eclipse workspace

1) eclipse->window->preferences->general->workspacetypes
2) Change the text file encoding format to GBK

3 changing the encoding format of individual files

In Package Explorer, right-click File--Properties, change the text file encoding format to GBK

4 If the above methods still can not be resolved, the following is the last resort:

Open the file to transcode with EditPlus, if there is no garbled in the EditPlus, can directly copy the contents of the file to eclipse, if EditPlus also garbled, you can first in EditPlus transcoding,editplus-> documents File encoding method, change the file encoding mode->GBK, and then use Eclipse to open it.

5,

Opening eclipse, sometimes the Chinese comment garbled, this is because the default encoding of the text file encoding in Eclipse is GBK, so right click on your "project", the "Text file encoding" in info In the other changes to UTF-8, you can!

Eclipse Chinese Comment garbled solution

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.