idea中IntelliJ IDEA控制台输出中文乱码--该如何处理呢?
今天使用IDEA调试程序时,发现控制台输出的信息都是乱码,那么这种情况该如何处理呢?
下文笔者将一一道来,如下所示
1.修改编辑器中的编码--避免编辑器中文件乱码
2.添加VM启动参数 -Dfile.encoding=UTF-8


下文笔者将一一道来,如下所示
实现思路: 我们只需在VM启动时,添加相应的启动参数即可 添加 -Dfile.encoding=COMPAT 例: 添加 -Dfile.encoding=UTF-8例:
1.修改编辑器中的编码--避免编辑器中文件乱码
2.添加VM启动参数 -Dfile.encoding=UTF-8



版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。