Java Chinese display garbled way to solve

Source: Internet
Author: User

MyEclipse import source file after Java file Chinese garbled problem, *.java file in Chinese can not display, are garbled

Workaround (found online, verified):

I. Encoding the entire project Setup UTF-8 (UTF-8 can be the largest support internationalization)

The Text file encoding in the Windows->preferences->general->workspace->text file encoding->other box is changed to UTF-8, Then click the Apply button. (can only be changed to UTF-8,GBK I have tried and can not yo)


Two. Set the Java source file encoding to UTF-8.

Windows->preferences->general->contenttypes (Some of the web is the context types, do not know whether it is a version problem, or a clerical error) Open text, select Java sourcefile, Enter UTF-8 in the Defaultencoding input box below and click Update to set the Java file encoding to UTF-8.

Java Chinese display garbled way to solve

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.