Home > Java > javaTutorial > body text

How to solve garbled characters in eclipse

藏色散人
Release: 2019-09-04 09:44:59
Original
24971 people have browsed it

How to solve garbled characters in eclipse

How to solve the problem of garbled characters in eclipse?

1. Set the encoding of the workspace

1 The encoding of the editor will affect the display of characters in all projects, which can be said to be the most effective Extensive settings, every project will be affected by this setting. Click Window - Preferences in the menu bar.

How to solve garbled characters in eclipse

2 Click General - Wordspace, and then select the text file encoding format you want to set on the right Encoding format, the system default format is GBK.

How to solve garbled characters in eclipse

Recommended: "Java Tutorial"

2. Set the project encoding

1 If there is no garbled code problem in other projects, but garbled codes appear when displaying individual projects, then we do not need to set the encoding of the workspace, we only need to modify the encoding of the project.

2 After selecting the item, right-click and click Properties in the pop-up menu.

How to solve garbled characters in eclipse

#3 In the pop-up properties window, select Resource - click to select Other, and then select the encoding format you want.

How to solve garbled characters in eclipse

3. Set the encoding of a single file

1 If only some files are garbled, then set the encoding format of individual files. The problem can be solved. Select the garbled file and right-click.

How to solve garbled characters in eclipse

#2 Select Properties in the pop-up menu.

How to solve garbled characters in eclipse

#3 Select the resource in the pop-up properties window, click Other and set the encoding method of individual files.

How to solve garbled characters in eclipse

Notes

The three setting encoding methods have different effects. If the encoding method of the workspace is modified, other projects will be affected. ; If the encoding method of the project is modified, other files will be affected; if the encoding method of the file is modified, only the file will be changed.

The main encoding methods for displaying Chinese are GBK and UTF-8. UTF-8 is an internationally accepted Chinese encoding standard and is recommended.

The above is the detailed content of How to solve garbled characters in eclipse. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template