Eclipse garbled Problem Summary

Source: Internet
Author: User

The console of Eclipse must be encoded with GBK. So condition 1 and condition 4 must satisfy the otherwise running or garbled characters at the same time. To ensure that it is not garbled.

Condition 1,window | Preferences |  Workspace | Text fileencoding | GBK encoding.
This defines the encoding for the entire work interval.
This will put the coding format of the entire workspace dead, but if a project is using a different encoding format, this is resolved separately. As follows:

Condition 2, right-click on Project | Properties |  Resource | Text fileencoding | UTF-8 encoding . or a suitable encoding format. This defines the code for the entire project.

This will be the entire project coding format is dead, but if a file with a different encoding format, so that the resolution alone. As follows:

Condition 3, right-click on a File | Properties |  Resource | Text fileencoding | UTF-8 encoding.

or a suitable encoding format. This defines the encoding of a single file.
Here is to say that the actual encoding of the file format takes precedence: The 3rd one, followed by 2, and the last with 1. Sometimes it is 123 and must meet the conditions. No matter how these kinds of coding format try it all know.

condition 4, there are run-time encoding settings as follows: Menu: Run Configuration | Right tab Common Console Encoding select GBK encoding. This is used to control console console display, must be GBK, it will not garbled. Although the conditions are not GBK, as long as 4 is GBK. The console is not garbled.
This ensures that the workspace and engineering code are programmed in a way that does not conflict with the encoding format of individual files in the project.
If there is no GBK option, no matter, direct input GBK three letters, Apply, GBK encoded in Chinese, is not garbled

One day, we want to change the code of other people's coding format, as follows: 1: Open with Notepad, 2: Change the following encoding format such as utf-8,3: Save As

。 In this way, the saved encoding format becomes the encoding format you want.

Eclipse garbled Problem Summary

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: 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.