Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd encode and mintty encode #609

Closed
gMan1990 opened this issue Nov 21, 2016 · 2 comments
Closed

cmd encode and mintty encode #609

gMan1990 opened this issue Nov 21, 2016 · 2 comments

Comments

@gMan1990
Copy link

gMan1990 commented Nov 21, 2016

OS: Windows 7 Professional with Service Pack 1 Build 7601 x64 zh-cn

the cmd default chcp is 936(The default font is a dot matrix font), you can change follow this step:
1、chcp 936 (GBK)
2、Right-click the title bar, properties, click OK to make the settings take effect
if i set the font to ‘新宋体’ and run
chcp 65001 && "D:/Genuitec/MyEclipse 2016/binary/com.sun.java.jdk8.win32.x86_1.8.0.u66/bin/java.exe" -jar "D:/static_code_analysis/Checkstyle/checkstyle-7.2-all.jar" -c "D:/static_code_analysis/Checkstyle/google_checks.xml" "E:\Workspaces\test\common.xml"
this issues(checkstyle/checkstyle#3569) can be fixed
image

then use mintty (options > Text > Character > GBK)
ipconfig output is right, checkstyle output is wrong
image
then use mintty (options > Text > Character > UTF-8)
ipconfig output is wrong, checkstyle output is right
image
-------------------------------------------------------------------------
Option Ⅱ
cmd
1、chcp 65001 (UTF-8)
2、Modify the font, do not use dot matrix fonts
3、run "D:/Genuitec/MyEclipse 2016/binary/com.sun.java.jdk8.win32.x86_1.8.0.u66/bin/java.exe" -jar "D:/static_code_analysis/Checkstyle/checkstyle-7.2-all.jar" -c "D:/static_code_analysis/Checkstyle/google_checks.xml" "E:\Workspaces\test\common.xml"
the checkstyle output is right

then use mintty (options > Text > Character > GBK)
image
then use mintty (options > Text > Character > UTF-8)
output looks like Option Ⅰ

@mintty
Copy link
Owner

mintty commented Nov 21, 2016

Duplicate #376.
For Java, your workaround would be

java -Dfile.encoding=UTF-8

or more generally

java -Dfile.encoding=`locale charmap`

.

@mintty
Copy link
Owner

mintty commented Dec 16, 2019

Cygwin 3.1.0 has been released with ConPTY support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants