This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 2.6.0: unreadable UTF-8 in Windows console
- From: Ivan Vanyushkin <vanav at vanav dot org>
- To: cygwin at cygwin dot com
- Date: Sun, 2 Oct 2016 09:58:08 +0300
- Subject: Re: Cygwin 2.6.0: unreadable UTF-8 in Windows console
- Authentication-results: sourceware.org; auth=none
- Authentication-results: marvin.c0d.org (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=vanav.org
- References: <123291584.20161001051347@vanav.org> <75a1vb1q48pqra6e9ksi3sricp66a59db9@4ax.com>
I want to share binary built under Cygwin 2.6.0 with other user, that has no LANG set.
In previous version all binaries worked correctly with UTF-8 input text.
But now this doesn't work as expected.
Some more simple tests.
// Run Windows console.
cmd
C:\Cygwin_2.6.0\bin\echo ±5°
▒▒5▒▒
C:\Cygwin_2.6.0\bin\echo ±5°|C:\Cygwin_2.6.0\bin\grep .
▒▒5▒▒
// Bad in Cywgin 2.6.0. Maybe this is UTF-8? See below.
// Now try in previous version.
C:\Cygwin_2.5.2\bin\echo ±5°
±5°
C:\Cygwin_2.5.2\bin\echo ±5°|C:\Cygwin_2.5.2\bin\grep .
±5°
// Good in Cygwin 2.5.2.
// Looks like changing console to UTF-8 codepage may fix the issue?
chcp 65001
Active code page: 65001
C:\Cygwin_2.6.0\bin\echo ±5°
▒▒5▒▒
C:\Cygwin_2.6.0\bin\echo ±5°|C:\Cygwin_2.6.0\bin\grep .
▒▒5▒▒
echo ±5°
±5°
echo ±5°|C:\Cygwin_2.6.0\bin\grep .
▒▒5▒▒
// Bad in Cygwin 2.6.0. Seems this is not UTF-8, just broken text.
// Now try in previous version.
C:\Cygwin_2.5.2\bin\echo ±5°
±5°
C:\Cygwin_2.5.2\bin\echo ±5°|C:\Cygwin_2.5.2\bin\grep .
±5°
echo ±5°
±5°
echo ±5°|C:\Cygwin_2.5.2\bin\grep .
±5°
// Works good in Cygwin 2.5.2 even with native "echo", because it produces UTF-8 now.
Sunday, October 2, 2016, 9:29:11 AM, you wrote:
> You don't have LANG set to "C.UTF-8". Do that.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple