From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12924 invoked by alias); 17 Sep 2011 21:50:14 -0000 Received: (qmail 12916 invoked by uid 22791); 17 Sep 2011 21:50:13 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from granite1.mail.cornell.edu (HELO authusersmtp.mail.cornell.edu) (128.253.83.141) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Sep 2011 21:49:57 +0000 Received: from [192.168.1.2] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p8HLnu3J018697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sat, 17 Sep 2011 17:49:56 -0400 (EDT) Message-ID: <4E751602.8070201@cornell.edu> Date: Sat, 17 Sep 2011 22:50:00 -0000 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: cygwin started speaking German today References: <7856072A9D04C24B82DFE2B1112FE38A0C27492B56@MCHP058A.global-ad.net> <201109081246.23238.bruno@clisp.org> <4E68AF35.9030002@cwilson.fastmail.fm> <201109082344.55506.bruno@clisp.org> <4E69D9EA.2050004@cwilson.fastmail.fm> <20110909145921.GA27289@calimero.vinschen.de> <4E6F7AA1.4090808@redhat.com> <20110917204041.GC28100@jethro.local.lan> In-Reply-To: <20110917204041.GC28100@jethro.local.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-09/txt/msg00248.txt.bz2 On 9/17/2011 4:40 PM, David Sastre wrote: > On Tue, Sep 13, 2011 at 09:45:37AM -0600, Eric Blake wrote: >> 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. > > WRT the base-files package, would it be acceptable/does it make sense to set: > > test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}"&& export LANG=${locale -sU} > > in /etc/profile.d/lang.sh and > > if ( $?LC_ALL == 0&& $?LC_CTYPE == 0&& $?LANG == 0 ) setenv LANG = `locale -sU` > > in /etc/profile.d/lang.csh, both as proposed, _and_ a (possibly) commented-out > > test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}"&& export LANG=${locale -uU} > > in the skeletal .bash_profile and .profile (i.e. both system-wide and > user defined settings)? If you want the user-defined setting to take effect, wouldn't you have to omit the `test -z ...'? LANG will already be set when .bash_profile is processed. Ken -- 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