按下快捷键Win+R,输入regedit打开注册变编辑器,依次找到 HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\,右键新建一个字符串值(S), 取名叫Autorun,值设为@chcp 65001>nul,确定保存退出。 重新运行程序便可以正确的显示中文了。
Win+R
regedit
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\
Autorun
@chcp 65001>nul
Windows10cmd编码格式改为UTF-8
原文:http://www.cnblogs.com/ShaoXin/p/7373084.html