Intellij Idea控制台输出中的编码错误 [英] Intellij Idea incorrect encoding in console output

查看:573
本文介绍了Intellij Idea控制台输出中的编码错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎真的很疯狂,但我对intellij想法的控制台中的编码损坏无能为力。

It seems to be really crazy, but I can't do anything with broken encoding in console of my intellij idea.

我为解决这个问题所做的事情:

Things I made to overcome this:


  1. 在idea.exe.vmoptions和idea64.exe中设置-Dfile.encoding = UTF-8和-Dfile.encoding = UTF-8 .vmoptions(我使用64位版本)。

  2. 添加-Dfile.encoding = UTF-8和-Dfile.encoding = UTF-8来运行/调试我的应用程序的配置。

  3. 更改设置>编辑器>文件编码IDE编码/项目编码/属性文件的默认编码为UTF-8。

完成所有这些操作仍然没有运气,并且控制台中没有正确显示符号。我试图调试java.io.PrintStream #println(java.lang.String)方法,发现System.out.textOut.out.se.cs等于windows-1251。不知道这个价值来自哪里。

Having all this done there is still no luck and symbols are not shown correctly in the console. I tried to debug java.io.PrintStream#println(java.lang.String) method and found out that System.out.textOut.out.se.cs equals to windows-1251. No idea where this value is coming from.

这个问题困扰了我很长一段时间,我无法在网上找到任何可以帮助我的东西。

This issue have been bothering me for a long period of time and I was unable to find anything in the web that could help me.

提前感谢您的帮助。

推荐答案

尝试

-Dconsole.encoding=UTF-8

而不是

-Dfile.encoding=UTF-8

这篇关于Intellij Idea控制台输出中的编码错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆