MSYS2-packages: [BUG] Wrong charset after upgrade to msys2-runtime-3.1.4
Steps to Reproduce the Problem
python -c 'print("世界")'
荳也阜
Additional Context
locale
LANG=en_US.UTF-8
LC_CTYPE=“en_US.UTF-8”
LC_NUMERIC=“en_US.UTF-8”
LC_TIME=“en_US.UTF-8”
LC_COLLATE=“en_US.UTF-8”
LC_MONETARY=“en_US.UTF-8”
LC_MESSAGES=“en_US.UTF-8”
LC_ALL=
The Following Methods Can All Get Correct Result
- Downgrade msys2-runtime to 3.0.7
winpty python -c 'print("世界")'
python -c 'print("世界")' | iconv -f utf-8 -t utf-8
chcp.com 65001 && python -c 'print("世界")'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 49 (30 by maintainers)
That’s exactly what reverting this commit means 😉
@dscho Сonfirm. Still the same error
Okay, Cygwin v3.1.5 seems to have fixed MinTTY (it was in their release notes that a segfault was fixed). With this, I can confirm that it actually is Cygwin that broke non-pseudo console mode in MinTTY:
I can reproduce this. And
MSYS=enable_pcon
fixes things. So maybe cygwin broke the non conpty fallback case which we default to@nyfair, your original post mentions various methods to get the correct result, but doesn’t say if you’re running mintty in the failing case. Other useful information would be the result of
command -v python
and output ofchcp.com
.