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: The C locale


2009/9/22 Lapo Luchini:
>> For example, a Windows filename "bÃh" turns into "bÃÂh" in 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Ãh" in WindowsExplorer, then
> open up an UTF-8 mintty console I have a consistent output with both
> LANG=C and LANG=it_IT.UTF-8 (of course, since right now C is UTF-8):
>
> % LANG=C ls -l|egrep b.h
> -rw-r--r-- 1 lapo None   0 Sep 22 09:53 bÃh
> % LANG=it_IT.UTF-8 ls -l|egrep b.h
> -rw-r--r-- 1 lapo None   0 22 Sep 09:53 bÃh

You've presumably got mintty set to UTF-8, hence mintty's output
conversion turned ls's ISO-8859-1 "ÃÂ" (i.e. "\xC3\xA4") into "Ã".


> So I'm not sure what do you mean with 'a Windows filename "bÃh" turns
> into "bÃÂh" in the C locale'... you mean that a script sees it as
> 62C3A468 as opposed as 62E468? Or that actual "bÃÂh" is shown somewhere?

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


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