cygwin started speaking German today

Eric Blake eblake@redhat.com
Thu Sep 8 13:13:00 GMT 2011


On 09/08/2011 01:47 PM, Andy Koppe wrote:
> On 8 September 2011 13:04, Charles Wilson wrote:
>> On 9/8/2011 6:46 AM, Bruno Haible wrote:
>>> There is nothing to "fix". Users who don't want internationalization system-wide
>>> can set their locale in the "Regional Settings" control panel to English.
>>> Users who want to have a German Windows but a non-internationalized Cygwin can
>>> set LANG=C or LC_ALL=C - exactly like POSIX specifies.
>>
>> But setting LANG=C.UTF-8 (and not setting any of the LC_* vars at all)
>> should have the same behavior as setting LC_ALL=C.UTF-8.
>>
>> It does not -- and THAT's the bug.
>
> I agree.
>
> Further to that, however, Cygwin developers decided that the system
> default locale in case neither the relevant LC_* nor LANG are set
> should also be "C.UTF-8". That's what setlocale(LC_BLA, "") returns in
> that case. It's rather dubious behaviour of libintl to override that.

I'd argue that if none of LC_* or LANG are set, then 
setlocale(LC_BLA,"") should indeed return the system default, rather 
than being hard-coded to C.  POSIX intentionally left behavior as 
implementation-defined on which locale is returned when none of the 
environment variables set a locale, precisely so that systems could 
implement a sane default according to user preferences expressed in some 
other manner.

>
> Cygwin isn't Windows; it's a POSIX environment on top of Windows.
> Taking the Regional Settings control panel into account might well
> make sense, but it ought to be left to the Cygwin developers to decide
> on this and implement it centrally.

I also agree with this sentiment - if setlocale(LC_BLA, "") is not 
returning sane results (that is, if there is a system default, but 
cygwin is not honoring those defaults), then the bug should be fixed in 
cygwin, not libintl.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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



More information about the Cygwin mailing list