第一步:在file->setting->Editor->FileEncoding设置Global Encoding和Project Encoding。

IDEA中文乱码

第二步:idea.exe.vmoptions文件末尾加上-Dfile.encoding=UTF-8

第三步:在项目目录下面查找encoding.xml文件,将其中出现的其它字符集全部改做UTF-8,或者只保留下面的数据:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
    <file url="PROJECT" charset="UTF-8" />
  </component>
</project>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2021-04-25
  • 2021-11-30
  • 2021-07-26
  • 2021-12-08
  • 2021-12-03
猜你喜欢
  • 2021-12-21
  • 2021-10-15
  • 2021-11-05
  • 2021-10-27
  • 2021-06-01
  • 2021-05-31
  • 2021-11-06
相关资源
相似解决方案