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

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

Case insensitivity seems to ignore lower bound of interval


From: Eric Bischoff
Subject: Case insensitivity seems to ignore lower bound of interval
Date: Tue, 26 Apr 2011 17:27:49 +0200
User-agent: KMail/1.13.6 (Linux/2.6.38-8-generic; KDE/4.6.2; x86_64; ; )

Hi all,


$ echo "ijklmnopqrstuvwxyz" | awk '{ gsub(/[R-Z}/, "X"); print }
ijklmnopqrXXXXXXXX

please notice that "r" is not matched, i.e. case insensitivity is applied only 
to [S-Z] interval.

$ awk --version
GNU Awk 3.1.7
(...)

$ echo $LANG
fr_FR.UTF-8

The problem does not appear when locale is C.

The problem does not appear when interval is specified as [r-z] (lower case)..

This contradicts http://www.gnu.org/software/gawk/manual/gawk.html#Locales
which documents 
     $ echo something1234abc | gawk '{ sub("[A-Z]*$", ""); print }'
as returning
     something1234
while it returns
     something1234a

Bug reproduced both on Ubuntu Natty beta 2 and on Fedora 15.


I hope that helps,

-- 
√Čric Bischoff - Bureau Cornavin
Technical writing and translations
http://www.bureau-cornavin.com
(+33) 3 68 46 00 85
sip:address@hidden



reply via email to

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