delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/08/09:13:49

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4E68BF74.7070407@redhat.com>
Date: Thu, 08 Sep 2011 14:13:24 +0100
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.12
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cygwin started speaking German today
References: <7856072A9D04C24B82DFE2B1112FE38A0C27492B56 AT MCHP058A DOT global-ad DOT net> <4E6828B0 DOT 4060807 AT cwilson DOT fastmail DOT fm> <201109081246 DOT 23238 DOT bruno AT clisp DOT org> <4E68AF35 DOT 9030002 AT cwilson DOT fastmail DOT fm> <CAHWeT-ZZx4NizjFsSwDZiKS9kVBG84gmGCmtYoeQKJywao9B2g AT mail DOT gmail DOT com>
In-Reply-To: <CAHWeT-ZZx4NizjFsSwDZiKS9kVBG84gmGCmtYoeQKJywao9B2g@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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 AT redhat DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019