Summary: | sys-apps/grep-2.5.1a-r1: case insensitive when using character class [ ] | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alexander Tsoy <alexander> |
Component: | [OLD] Core system | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | truedfx |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Alexander Tsoy
2009-05-12 18:50:04 UTC
If you want a-z to match only lowercase characters, set LC_ALL to C. Your locale orders characters as aAbBcC...sStTuU...zZ (or as AaBbCc...SsTtUu...Zz, I suppose), where uppercase T is between lowercase a and lowercase z. This is the expected behaviour. (In reply to comment #1) Yes, it helped. $ LC_ALL=C bash -c "echo abc | grep '[A-Z]'" $ LC_ALL=C bash -c "echo ABC | grep '[A-Z]'" ABC $ But why Debian whith ru_RU.UTF-8 locale doesn't have this issue? You'd have to ask the Debian folks: Gentoo's grep is mostly identical to grep as released by GNU right now, there are just a few build fixes. Debian seems to have a collection of patches for it that may have changed its behaviour in this case. I found an older bug. May be it should be fixed again? http://bugs.gentoo.org/show_bug.cgi?id=76192 |