[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: proposal: make [A-Z] range handling locale-independent
From: |
Jim Meyering |
Subject: |
Re: proposal: make [A-Z] range handling locale-independent |
Date: |
Thu, 16 Jun 2011 17:42:36 +0200 |
Philipp Thomas wrote:
> * Jim Meyering (address@hidden) [20110616 11:57]:
>
>> In some locales, the [A-Z] regexp currently matches 25 of the
>> lower case letters. For example,
>>
>> $ echo a| LC_ALL=cs_CZ grep '[A-Z]'
>> a
>> $ echo y| LC_ALL=cs_CZ grep '[A-Z]'
>> y
>
> Sorry for chiming in late, but IMO that's why [:upper:] and
> [:lower:] exist and work as expected.
I think that most people reading this do know
about character classes like [:lower:] and [:upper:].
However, I've just checked my shell's history (which goes back years)
and find 483 uses of [a-z] (case-insensitive) and only
37 uses of [:lower:] and [:upper:] (and some of those are tr arguments).
But that's just command-line usage, where I know I have LC_ALL=C.
It's not for nothing: [a-z] is a lot easier/quicker to type
and less esoteric than the likes of [[:lower:]].
> On the other hand, SUSE by default
> ignores locale settings besides LC_CTYPE for root exactly because so many
> scripts blindly assume ASCII locale.
- Re: Dealing with character ranges in grep, (continued)
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/10
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/15
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/16
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/16
- Re: Dealing with character ranges in grep, Philipp Thomas, 2011/06/16
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/17
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/17
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/27
- proposal: make [A-Z] range handling locale-independent, Jim Meyering, 2011/06/16
- Re: proposal: make [A-Z] range handling locale-independent, Philipp Thomas, 2011/06/16
- Re: proposal: make [A-Z] range handling locale-independent,
Jim Meyering <=
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/16
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/16
- Re: Dealing with character ranges in grep, Stanislav Brabec, 2011/06/16
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/16
- Re: Dealing with character ranges in grep, Stanislav Brabec, 2011/06/16
- Re: Dealing with character ranges in grep, Johannes Meixner, 2011/06/16
- Re: Dealing with character ranges in grep, Aharon Robbins, 2011/06/16
- Re: Dealing with character ranges in grep, Paolo Bonzini, 2011/06/27
- Re: Dealing with character ranges in grep, Jim Meyering, 2011/06/27
Re: Dealing with character ranges in grep, Karl Berry, 2011/06/10