X-Recipient: archive-cygwin@delorie.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: <4E94AD74.10208@redhat.com>
Date: Tue, 11 Oct 2011 14:56:20 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.15
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: LC_COLLATE vs. egrep -- bug or (non-)feature?
References: <f5by5wrjpxo.fsf@calexico.inf.ed.ac.uk>	<4E949E1F.5020403@redhat.com> <f5bhb3fjlsu.fsf@calexico.inf.ed.ac.uk>
In-Reply-To: <f5bhb3fjlsu.fsf@calexico.inf.ed.ac.uk>
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
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 10/11/2011 02:49 PM, Henry S. Thompson wrote:
>
>> LANG=preferred LC_COLLATE=C
>>
>> and don't set LC_ALL.
>
> Hmm.  Two remaining questions:
>
>   1) By 'preferred', I presume you mean my preferred setting, e.g. en_GB.utf8

Correct.

>   2) _Where_ should I set those values?  As far as I can tell I'm not
>      currently setting them at all. . .

For individual users, ~/.bashrc, ~/.profile, ~/.zshrc, or whatever other 
shell-specific startup files you use, works well.

There's currently ongoing discussion about making cygwin's locale(1) 
program provide sane defaults based on the current Windows localization 
settings, which would then be incorporated into /etc/profile for 
system-wide default for all shells, but that thread hasn't yet settled 
on the final patches to use.

For a single override, do so in the script needing the override (and 
that's where setting LC_ALL=C is most commonly seen - for example, all 
./configure scripts sanitize the world to the C locale up front).

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

