bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] v4.1.3 (run on OSX 10.11.3): potential gsub() bug


From: Hermann Peifer
Subject: Re: [bug-gawk] v4.1.3 (run on OSX 10.11.3): potential gsub() bug
Date: Sun, 31 Jan 2016 21:01:02 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 2016-01-31 20:21, Aharon Robbins wrote:
> 
> The questions raised are messy.  I don't have good answers.  I think
> that if you use [...] with real UTF-8 encoded characters as the
> start and end point of the ranges, things will work OK.  But I'm not
> sure.
> 

Thanks for the hint. Using real UTF-8 characters works as expected, as
far as I can see. (Both under gawk 4.1.3 and gawk/master.)

Hermann

# Only ÄÖÜ are in the range [£-ß]
$ echo ABCÄÖÜŹŻŽ | gawk '{ gsub(/[£-ß]/, ""); print }'
ABCŹŻŽ
$
$ echo ABCÄÖÜŹŻŽ | gawk '{ gsub(/[^£-ß]/, ""); print }'
ÄÖÜ




reply via email to

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