X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.1 required=5.0	tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4CF9BA08.8060703@redhat.com>
References: <4CF96F70.3090507@veritech.com>	<AANLkTikQJEJ6kHKZdzzA_YB_DHgZBevCLDKtAEm6ZgBg@mail.gmail.com>	<4CF9BA08.8060703@redhat.com>
Date: Sat, 4 Dec 2010 10:05:42 -0400
Message-ID: <AANLkTi=pSXnqvF5OsQbaP8nE6sGHsL6crOG3z9D6SzWs@mail.gmail.com>
Subject: Re: Problem with Bash regex test case sensitivity
From: Lee <ler762@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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 12/3/10, Eric Blake <eblake@ > wrote:
> On 12/03/2010 07:11 PM, Lee wrote:
>>> Or, is this a bug?
>
> No, but a "feature" of your locale.  Set 'export LC_COLLATE=C', and use
> LANG rather than LC_ALL for all your other locale defaults, in your
> ~/.bashrc if you don't like it.

Nice tip - thank you.  But is there a reason I'd want LANG set to
en_US.UTF-8 instead of C.UTF-8?  As far as I can tell, everything
works for me with LANG=C.UTF-8.  Other than changing the collating
sequence to something I don't want, what does LANG=en_US.UTF-8 get me
that LANG=C.UTF-8 doesn't?

& as long as I'm showing how ignorant I am...  why put the local
defaults in ~/.bashrc?  My understanding is that ~/.bashrc is called
at every shell startup.  Seems like that's one of those things that
just needs to be set in the login shell, so wouldn't ~/.bash_profile
be more appropriate for the locale settings?

>> Welcome to the new world order :-0   I tried to figure out why the
>> collating sequence changes with the language settings but didn't get
>> anywhere beyond the fact that it _does_ change.  Oh well.. try, try
>> again.
>
> Read the FAQ.  http://www.faqs.org/faqs/unix-faq/shell/bash/, E9.

Which says the en_US locale collates the upper and lower case letters like this:
	AaBb...Zz

I got that much :)  What I don't get is why someone would _want_ the
collating sequence to be AaBb... or why that sequence was picked for
en_US instead of using the natural order of A-Za-z.

Regards,
Lee

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

