Solve the problem of moving the Eclipse project in Windows to Linux with garbled characters

Source: Internet
Author: User

Have you ever metLinuxUsed in the systemEclipseCheck the program code written in Windows, but is it garbled? Don't worry. The content of the next article will tell you how to solve it.

We all know that the default encoding method in Windows is gbk, while in Linux, the encoding method is UTF-8, and in eclipse, the encoding method in Linux is also UTF-8, so garbled code occurs. The solution is to change the encoding method in eclipse to gbk.

Solution:

Eclipse-> Window-> Preferences-> General-> Content Types, select Java Source File on the right side, and write gbk and update in the following defaut encoding.

If this is not the case, you can change the project attribute to gbk:

 

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.