I recently in the use of IntelliJ idea, found that always appear in Chinese garbled problems, found on the internet a lot of tutorials, found really "the world article a big copy." You might as well try to solve it yourself.
1, editor and debugging information Chinese garbled problem
Solution:
Choice: File->settings->editor->file Encoding
Then select UTF-8 at the right-hand IDE Encoding, and also select UTF-8 encoding at Project Encoding. In this way, the newly created file will be UTF-8 encoded in the form of a no longer in the case of garbled Chinese. If you open some files directly, at the same time, these two places have selected UTF-8 encoding, but there is still a Chinese garbled situation. At this point, it is possible because the newly added files are not UTF-8 encoded at the time of establishment, so the Chinese garbled situation will still appear. A straightforward workaround is to create a few new files under Idea, and then copy and paste the contents of the file you want to open directly into the idea new file.
2, idea other windows of Chinese garbled problem
As shown in the following:
The file opened in the diagram, or the Font display window, the Chinese characters have become garbled.
This occurs because the fonts provided by the Linux system do not support the display of Chinese, and in idea, the default is Ubuntu font, which does not support Chinese display. Therefore, you also need to download a font that supports Chinese display.
(1) Download fonts that support Chinese display
Search on the internet for a long time, many people recommend simsum fonts (online download is very convenient):
Where the SimSun folder contains the Simsun.ttf font file.
(2) Add the downloaded fonts to the System font Library
I'm here to add to the/usr/share/fonts/truetype folder, as shown below
(3) Restart idea
Restart idea, then select File->settings->appearance & Behavior->appearance as shown below:
On the right, tick the "Override default fonts by (...)" and select the SimSun font you just added in the "Name" option to display the Chinese language now. As shown below:
The problem has been solved perfectly.
IntelliJ idea Chinese garbled problem solution