search
HomeJavaJavagetting StartedHow to solve the garbled code in eclipse java

How to solve the garbled code in eclipse java

Nov 11, 2019 pm 02:33 PM
eclipsejavaGarbled characters

How to solve the garbled code in eclipse java

The eclipse project code displays Chinese garbled characters

How to solve the garbled code in eclipse java

There are 4 solutions:

1. Set the encoding method of the workspace

Click the windows menu in the menu

How to solve the garbled code in eclipse java

Select from the drop-down menu. Preferences option.

How to solve the garbled code in eclipse java

Enter the general option, select the workspace option, click Apply, and click OK to exit.

How to solve the garbled code in eclipse java

2. Set the encoding method for a single project

Right-click the project project and select the last item " Properties".

Select Resource (the first one) in the menu tree on the left of the new window that opens, then find Text file encoding on the right, select "other", and select the required encoding method in the drop-down box.

How to solve the garbled code in eclipse java

3. Set the encoding method of a type of file

Suppose you want to set the js file encoding method to UTF-8, then It should be Window->General->Content Types, select JavaScript Source File in Content Types, select *.js in the File associations column, then enter UTF-8 in the Default Encoding column, click Update, and save.

How to solve the garbled code in eclipse java

4. Set the encoding method of a single file

Right-click the file to be modified and select the last one in the pop-up menu Item "Properties".

How to solve the garbled code in eclipse java

Select Info (the first one) in the menu tree on the left of the new window that opens, then find Text file encoding on the right, select "other", and select "other" in the drop-down box Select the required encoding method. The method is similar to modifying the project coding method.

How to solve the garbled code in eclipse java

Successful setting result

How to solve the garbled code in eclipse java

php Chinese website, a lot of free Java introductory tutorial, welcome to learn online!

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

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools