X-Recipient: archive-cygwin AT delorie DOT 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 DOT 3090507 AT veritech DOT com> <4CF9BA08 DOT 8060703 AT redhat DOT com> Date: Sat, 4 Dec 2010 10:05:42 -0400 Message-ID: Subject: Re: Problem with Bash regex test case sensitivity From: Lee To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 12/3/10, Eric Blake 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