bug-grep
[Top][All Lists]
Advanced

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

[bug #16567] -i and character classes `[ab]' in multibyte locale (utf8)


From: anonymous
Subject: [bug #16567] -i and character classes `[ab]' in multibyte locale (utf8)
Date: Fri, 12 May 2006 05:59:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.13) Gecko/20060411 Firefox/1.0.8 SUSE/1.0.8-0.2

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16567>

                 Summary: -i and character classes `[ab]' in multibyte locale
(utf8)
                 Project: grep
            Submitted by: None
            Submitted on: Freitag 12.05.2006 um 05:59 UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:

`[ab]' and `(a|b)' in combination with option `-i' should be equivalent, I
guess. They aren't in multibyte locales (utf8).

In addition `-i' prohibits a match when `[AaBb]' is searched.

The error doesn't occur when the text is downcase and the pattern uppercase.

[volga:~] echo Elk | LC_ALL=C grep -i '[eo]lk'
Elk
[volga:~] echo Elk | LC_ALL=en_US grep -i '[eo]lk'
Elk
[volga:~] echo Elk | LC_ALL=en_US.utf8 grep -i '[eo]lk'
[volga:~] echo Elk | LC_ALL=en_US.utf8 grep -i '\(e\|o\)lk'
Elk
[volga:~] echo Elk | LC_ALL=en_US.utf8 grep -i '[EeOo]lk'
[volga:~] echo Elk | LC_ALL=en_US.utf8 grep '[EeOo]lk'
Elk
[volga:~] echo elk | LC_ALL=en_US.utf8 grep -i '[EO]lk'
elk
[volga:~] grep -V
grep (GNU grep) 2.5.1
[volga:~] uname -a
Linux volga 2.6.13-15.8-default #1 Tue Feb 7 11:07:24 UTC 2006 i686 i686 i386
GNU/Linux


In the manpage I found:

Many locales sort characters  in  dictionary  order,  and  in  these 
locales
[a-d] is typically not equivalent to [abcd]; it might be equivalent to
[aBbCcDd], for example.


sebastian nagel (wastl[]cis.uni-muenchen.de)






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=16567>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

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