Intellij IDEA output 中文亂碼問題,網上有很多解決方案,但是不盡人意,自己總結了一下。
1、修改啟動參數
修改安裝Intellij目錄下的\bin\idea.exe.vmoptions(IDEA的安裝目錄),在末尾加上啟動Intellij的參數,如下。
-Dfile.encoding=UTF-8
或者點擊IDEA的Help菜單,選擇Edit Custom VM options,在末尾添加 -Dfile.encoding=UTF-8
2、修改文件編碼格式
在Settings中,選擇Editor--File Encoding,設置IDE Encoding 為UTF-8,Project Encoding UTF-8模式。
3、打開Tomcat 安裝目錄\conf下的logging.properties,查看 java.util.logging.ConsoleHandler.encoding = UTF-8,
看其是否是=UTF-8,不是就改為UTF-8
