IntelliJ IDEA console Chinese garbled solution

Configure Intellij's configuration file

write picture description here 
Open the root directory of Intellij, find the two files in the figure below (select one of the configuration files according to whether your system is 32-bit or 64-bit), and add to the configuration file:

-Dfile.encoding=UTF-8
  • 1

Configure project encoding and IDE encoding

write picture description here 
Go to settings, select File Encodings, configure IDE Encoding and Project Encoding to UTF-8, and also configure the following Default encoding for properties files to UTF-8.

Configure project startup server parameters

write picture description here 
Add in VM options item

-Dfile.encoding=UTF-8
  • 1

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325385499&siteId=291194637