bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] tests: add testcase for previous fix


From: Jim Meyering
Subject: Re: [PATCH 2/2] tests: add testcase for previous fix
Date: Thu, 23 Sep 2010 13:59:06 +0200

Paolo Bonzini wrote:
> On 09/23/2010 09:21 AM, Jim Meyering wrote:
>> This shows the bad-old behavior (grep-2.7 and earlier)
>> note how [A-Z] matches lower case letters:
>>
>>      printf '00a\n00g\n00z\n00A\n00G\n00Z\n'>  in
>>      $ LC_ALL=en_US.UTF-8 /bin/grep -E '[A-Z]' in
>>      00g
>>      00z
>>      00A
>>      00G
>>      00Z
>>
>> With Paolo's change we avoid that common source of confusion:
>>
>>      $ LC_ALL=en_US.UTF-8 ./grep -E '[A-Z]' in
>>      00A
>>      00G
>>      00Z
>
> Or better, we're at glibc's mercy:
>
> $ LC_ALL=cs_CZ.UTF-8 devel/grep/+build/src/grep -E '[A-Z]' in
> 00a
> 00g
> 00A
> 00G
> 00Z

Good point.  But with those other more-common locales,
grep now works the way people expect.  That will go a
long way towards minimizing confusion.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]