Solution to Chinese garbled characters in java:
1. Set the encoding of the workspace
1. The encoding of the editor It will affect the display of characters in all projects. It can be said to be the most widespread setting. Every project will be affected by this setting. Click Window - Preferences in the menu bar.
2. Click General - Wordspace, and then select the encoding format you want to set in the Text file encoding format on the right. The system default format is GBK.
2. Set the encoding of the project
1. If there is no garbled code problem in other projects, but only some garbled codes appear when displaying, then we do not need to set up the work. For the encoding of the space, you only need to modify the encoding of the project.
2. After selecting the item, right-click and click Properties in the pop-up menu.
3. In the pop-up properties window, select Resource - click to select Other, and then select the encoding format you want.
3. Set the encoding of a single file
1. Only some files are garbled, so setting the encoding format of individual files can solve the problem. Select the garbled file and right-click.
2. Select Properties in the pop-up menu.
3. Select the resource in the pop-up properties window, click Other and set the encoding method of individual files.
For more java knowledge, please pay attention to java basic tutorial.
The above is the detailed content of How to solve Chinese garbled characters in Java?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)
