Home >Development Tools >notepad >What to do if notepad++ is garbled?

What to do if notepad++ is garbled?

(*-*)浩
(*-*)浩Original
2019-08-05 10:44:2112967browse

When we use Notepad, when we write a program, some parts of it contain Chinese characters, and then an error or garbled code will appear during compilation. In fact, this is a format problem. Let's take java as an example to discuss Let’s learn how to eliminate garbled characters.

What to do if notepad++ is garbled?

Open Notepad, create a new file HelloWorld.java and save it under the root directory of drive F, then type the code in it and print out "HelloWorld Hello World". (Recommended learning: notepad )

What to do if notepad++ is garbled?

Open the command line window, that is, the Windows R key, compile this program, and run it. You will find that the result is like this: The English HelloWorld is displayed normally, but the Chinese "Hello World" is displayed as garbled characters.

What to do if notepad++ is garbled?

Next we click "Settings (T)" - "Preferences" in the menu bar, and a dialogue window will appear, see the next picture.

What to do if notepad++ is garbled?

Select "New", change the option of the encoding window inside to "ANSI", save and exit.

What to do if notepad++ is garbled?

Rewrite the HelloWorld.java program and print the output in the command line window. You will find that the program displays normally.

What to do if notepad++ is garbled?

The above is the detailed content of What to do if notepad++ is garbled?. 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