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

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

Re: failure on [a-z] regex at gawk


From: Stepan Kasal
Subject: Re: failure on [a-z] regex at gawk
Date: Tue, 31 May 2005 09:49:54 +0200
User-agent: Mutt/1.4.1i

Hello,

the problem is with locales:
In UTF-8 locales, the ordering is aAbB...zZ.  So the range a-z includes
all letters but capital Z.

Observe:
$ LC_ALL=en_GB.utf-8 gawk 'BEGIN{print gensub(/[a-z]+/, "X", "g", "aZalZz")}'
XZXZX

To fix the issue, add

LC_ALL=C; export LC_ALL

near the top of each shell script which uses awk.

HTH,
        Stepan




reply via email to

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