bug-gnu-utils
[Top][All Lists]
Advanced

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

grep locale off by one?


From: P
Subject: grep locale off by one?
Date: Wed, 20 Aug 2003 14:34:46 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701

What in the name of holy collating orders
is going on below?


$ echo "Z" | grep "[a-z]"
$ echo "Y" | grep "[a-z]"
Y
$ echo "a" | grep "[A-Z]"
$ echo "b" | grep "[A-Z]"
b


I know LC_ALL=C "fixes it", and I understand the collating
order being case insensitive, but why the inconsistency,
on the first and last characters (a and Z
in this case). Is it an off by one? Version info follows.

$ rpm -q grep glibc pcre
grep-2.5.1-7
glibc-2.3.2-11.9
pcre-3.9-10


$ echo $LANG
en_IE.UTF-8


cheers,
Pádraig.





reply via email to

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