delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/08/07:06:59

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: <4E68A1B0.8060900@redhat.com>
Date: Thu, 08 Sep 2011 12:06: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>
In-Reply-To: <201109081246.23238.bruno@clisp.org>
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 11:46 AM, Bruno Haible wrote:
> Bernhard Voelker wrote:
>>> Starting with today's update, cygwin started speaking German:
>>>
>>> $ mkdir -v x0
>>> mkdir: Verzeichnis „x0“ angelegt
>>> $ LANG=C mkdir -v x2
>>> mkdir: created directory `x2'
>>> $ LANG=C.UTF-8 mkdir -v x1
>>> mkdir: Verzeichnis „x1“ angelegt
>>>
>>> Default is LANG=C.UTF-8 here.
>>>
>>> Ok, the PC is in Germany, but none of my environment
>>> variables have a 'de' inside.
>
> This is as it should be. See the NEWS entry from the gettext package:
>
> * Runtime behaviour:
>    - On MacOS X and Windows systems,<libintl.h>  now extends setlocale() and
>      newlocale() so that their determination of the default locale considers
>      the choice the user has made in the system control panels.

I read this as saying that if _none_ of LANG, LC_MESSAGES, or LC_ALL is 
set, then libintl is smart enough to choose the system default language. 
  But I still think that if LANG is explicitly C.UTF-8, then the user 
_has_ made an explicit language request - namely, the same language as 
for LANG=C (which is more or less English, but not always identical to 
en_US.UTF-8).

> There is nothing to change in cygwin's setlocale implementation, nor in
> libintl_setlocale. Both are POSIX compliant.

How is it POSIX compliant to ignore $LANG by using a different language 
for the C locale?  C.UTF-8 is just the C locale with a different 
charset, not carte-blanche to use the system-default language.

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