delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/09/13/11:46:09

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: <4E6F7AA1.4090808@redhat.com>
Date: Tue, 13 Sep 2011 09:45:37 -0600
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/20110831 Fedora/3.1.12-2.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.12
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, bug-gettext AT gnu DOT org
Subject: Re: cygwin started speaking German today
References: <7856072A9D04C24B82DFE2B1112FE38A0C27492B56 AT MCHP058A DOT global-ad DOT net> <201109081246 DOT 23238 DOT bruno AT clisp DOT org> <4E68AF35 DOT 9030002 AT cwilson DOT fastmail DOT fm> <201109082344 DOT 55506 DOT bruno AT clisp DOT org> <4E69D9EA DOT 2050004 AT cwilson DOT fastmail DOT fm> <CAHWeT-bQ=Qm7qyWzb9s-=Lfgwjh-vHrEk2BvYQS6X6707+EWMg AT mail DOT gmail DOT com> <20110909145921 DOT GA27289 AT calimero DOT vinschen DOT de>
In-Reply-To: <20110909145921.GA27289@calimero.vinschen.de>
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/09/2011 08:59 AM, Corinna Vinschen wrote:
> On Sep  9 13:33, Andy Koppe wrote:
>> The 'C.UTF-8' default locale is not a bug, it was a deliberate design decision.
>
> Exactly.  And it has been discussed a lot on the cygwin-apps mailing
> list.
>
> And above all, there *is* an official way for the user to align the
> Cygwin locale with the Windows locale, see the -s and -u options
> of the locale(1) command:
>
>    http://cygwin.com/cygwin-ug-net/using-utils.html#locale

On 09/09/2011 09:09 AM, Corinna Vinschen wrote:
 >> OK, then the following four facilities are needed in Cygwin.
 >>
 >> 1) We need the name of the locale which is in effect when the user has
 >>     not specified environment variables.
 >
 > In Fedora, for instance, the fallback is what is set as system default
 > in /etc/sysconfig/i18n.
 >
 > In Cygwin the fallback is the system default set in 
/etc/profile.d/lang.sh
 > or /etc/profile.d/lang.csh.
 >
 > Why should libintl use anything else on Cygwin, but not on Linux?
 >

Given this, I think the bug is in cygwin for having base files 
/etc/profile.d/lang.{sh,csh} which hardcode LANG to C.UTF-8 instead of 
using locale -s -u to default LANG to the preferred Windows settings. 
Libintl should NOT be second-guessing an explicit setting of LANG, but 
cygwin should NOT be explicitly setting LANG to C.UTF-8 in its default 
startup scripts without any regards to the Windows settings.  Whether 
setlocale(LC_ALL,"") returns C.UTF-8 or a Windows-appropriate string 
_when LANG is undefined_ is still worth solving, but right now, an 
out-of-the-box cygwin installation _always has LANG defined_ by the 
default startup scripts.  So our first focus should be to get that 
setting of LANG fixed to honor Windows, and to teach libintl that when 
LANG is set we really meant it.

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