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

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

Re: comma dot inconsistancy in gawk


From: Stepan Kasal
Subject: Re: comma dot inconsistancy in gawk
Date: Wed, 5 May 2004 14:42:26 +0200
User-agent: Mutt/1.4.1i

Hello,

On Wed, May 05, 2004 at 10:29:01AM +0200, Heinrich Vollmers wrote:
> GNU Awk 3.1.3
> There seems to be some inconsistancy and error when applying gawk which 
> did not appear in older versions (3.1.1):
> 
> gawk -v dx=1.026 -v b=-3.29102e-05 'BEGIN{a=0.000602917;print 
> b*dx+a,a,b,dx;}'
> -3,37659e-05 0 -3.29102e-05 1.026

the problem is caused by locale settings; you are probably using LANG=de_DE.

Please try to set "LC_ALL=C; export LC_ALL" at the beginning of the script.

With de_DE locale, awk should use "," as decimal dot, both in the input and
the output.  Unfortunately, this feature has some bugs.  Arnold Robbins,
the gawk maintainer, knows about the bugs, so they'll probably be fixed
when 3.1.4 is out.  For now, it's better so stick to C locale.

Hope I gave you all info you need.

Happy awking,
        Stepan Kasal




reply via email to

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