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

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

Re: [Fwd: gawk bug]


From: Aharon Robbins
Subject: Re: [Fwd: gawk bug]
Date: Tue, 23 Nov 2004 14:10:29 +0200

This does not occur when LC_ALL=C is set in the environment.
However, using LC_ALL=en_US.utf8, I too see the failure.

Yet Another address@hidden&*() locale problem.

Sigh.  I'll see if I can trace it down.

Thanks,

Arnold

> Date: Tue, 23 Nov 2004 10:13:07 +0100
> From: Eiso AB <address@hidden>
> To: address@hidden
> Subject: [Fwd: gawk bug]
>
> hi again(?),
>
> not sure if this got through yesterday, and I didn't include output.
>
> the script produces
> H99 N|
> instead of the expected
> H99 N
>
> so in the second gsub not all |'s
> are removed.
>
> goodluck, Eiso
>
> -------- Original Message --------
> Subject: gawk bug
> Date: Mon, 22 Nov 2004 18:20:42 +0100
> From: Eiso AB <address@hidden>
> To: address@hidden
> CC: address@hidden
> References: <address@hidden> <address@hidden> 
> <address@hidden>
>
>   hi Arnold,
>
> this produces a bug in gawk 3.1.4
>
>
> put this in an awk script (bug.awk)
> {
>            ( FILENAME ~ /[.]save$/ )
>            h=$2
>            gsub("[|]"," ",h)
>            x=$1
>            gsub("[|]"," ",x)
>            print x
> }
>
> then run as
>
> echo "|H99|N| |H99|HN|" > t.save ; gawk -f bug.awk t.save
>
>
>
> removal of:
> * ( FILENAME ~ /[.]save$/ )
> * gsub("[|]"," ",h)
> and change of the filename(!)
> will make the error disappear.
>
>
> very strange!
> goodluck,
>
> Eiso




reply via email to

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