I have a strange problem with UTF-8 characters when running bash from
the Windows command line. I hoped it would go away with the new Cygwin
1.7.0-46, but it is still there. Now I have simplified it down to
setting LANG=en_US.UTF-8 and running bash -c "echo £" (where '£' can be
any non-ascii character):
C:\cygwin17\bin>set LANG=en_US.UTF-8
C:\cygwin17\bin>.\echo £
£
C:\cygwin17\bin>bash -c 'echo a'
a
C:\cygwin17\bin>bash -c 'echo £'
bash: $'echo \302\243': command not found
C:\cygwin17\bin>bash -c "$'echo \302\243'"
bash: $'echo \302\243': command not found
C:\cygwin17\bin>bash -c "echo $'\302\243'"
£
It works if I don't set LANG, or set it to something else than UTF-8. It
also works in Cygwin 1.5.
Seems like UTF-8 makes bash escape the whole command line if it contains
non-ascii characters. Maybe it should only escape the non-ascii
characters? This might still cause problems with text in quotes.
Gunnar
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/