www.delorie.com/archives/browse.cgi | search |
2009/9/22 Lapo Luchini: >> For example, a Windows filename "b=C3=A4h" turns into "b=C3=85=C2=A4h" i= n the C locale, >> while it shows up correctly with explicitly set ISO-8859-1 or CP1252. > > Uh? Doesn't seem so to me: if I create "b=C3=A4h" in WindowsExplorer, then > open up an UTF-8 mintty console I have a consistent output with both > LANG=3DC and LANG=3Dit_IT.UTF-8 (of course, since right now C is UTF-8): > > % LANG=3DC ls -l|egrep b.h > -rw-r--r-- 1 lapo None =C2=A0 =C2=A0 0 Sep 22 09:53 b=C3=A4h > % LANG=3Dit_IT.UTF-8 ls -l|egrep b.h > -rw-r--r-- 1 lapo None =C2=A0 =C2=A0 0 22 Sep 09:53 b=C3=A4h You've presumably got mintty set to UTF-8, hence mintty's output conversion turned ls's ISO-8859-1 "=C3=85=C2=A4" (i.e. "\xC3\xA4") into "= =C3=A4". > So I'm not sure what do you mean with 'a Windows filename "b=C3=A4h" turns > into "b=C3=85=C2=A4h" in the C locale'... you mean that a script sees it = as > 62C3A468 as opposed as 62E468? Or that actual "b=C3=85=C2=A4h" is shown s= omewhere? Both. For the latter, try it in the default Cygwin console, without any locale variables set. > But OTOH as far as "not caring" goes, it sure can be a nice feature to > be retro-compatible in that single case Thanks. Unfortunately the "C" locale is rather important though, because that's what people will be using unless they go to the effort of finding out how to set a different locale. Andy -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |