[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fri, 25 Feb 2005 21:34:17 +0100
thank you for taking care to send the bug report.
On Fri, Feb 25, 2005 at 05:11:43PM -0500, jfp wrote:
> $ echo "A" | grep '[a-z]'
> $ echo "a" | grep '[A-Z]'
> $ echo "b" | grep '[A-Z]'
Unfortunately, this is not a bug, but a (weird) feature of modern locales.
Have you tried 'z' and 'Z'?
The problem is in locale settings, try "man locale".
The default for recent redhat systems seems to be "en_US.utf8".
If you set LC_ALL=C, the problem will disappear.
The utf8 encoding has this order of letters:
a A b B ... z Z
That's why A-Z contains 'b', but not 'a'.
Have a nice day,
- grep, jfp, 2005/02/25
- Re: grep,
Stepan Kasal <=