This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin 2.6.0: unreadable UTF-8 in Windows console


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]