1. Goland -Settings设置

① 点击Goland菜单栏File-Settings-Editor-File Encodings.
② 设置Global Encoding为UTF-8
③ 设置Project Encoding为 UTF-8
④ 设置 Default encoding for properties files为 UTF-8

Goland2020.1 控制台输出中文乱码的解决方案

2. 修改Goland设置文件

在Goland安装目录的\bin文件夹中,找到以下两个文件:

  • goland.exe.vmoptions
  • goland64.exe.vmoptions

在文件末尾添加【-Dfile.encoding=UTF-8】
Goland2020.1 控制台输出中文乱码的解决方案

3. 在Goland中修改设置文件

Goland菜单栏的Help-Edit Custom VM Options,
在打开的文件末尾处添加参数-Dfile.encoding=UTF-8
Goland2020.1 控制台输出中文乱码的解决方案

4. 重启Goland

问题解决!

相关文章:

  • 2021-04-18
  • 2021-08-15
  • 2022-12-23
  • 2021-08-16
  • 2022-01-01
猜你喜欢
  • 2021-08-25
  • 2021-07-05
  • 2022-01-08
  • 2021-08-24
  • 2021-08-31
  • 2022-12-23
  • 2021-10-26
相关资源
相似解决方案