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

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

Re: Locale dependant bug (?) with numeric input in gawk-3.1.3


From: Michael Mauch
Subject: Re: Locale dependant bug (?) with numeric input in gawk-3.1.3
Date: Wed, 28 Apr 2004 22:43:27 +0200
User-agent: Mutt/1.5.6i

Jim Meyering wrote:

> Michael Mauch <address@hidden> wrote:
> > % echo 0.1 0,1 | LC_ALL=de_DE gawk '{ print $1+1, $2+1 }'
> > 1 1
> >
> > I think gawk should recognize one of the formats "0.1" or "0,1" as a
> > number, but it doesn't seem to do so.
> 
> Here's what I get
> 
>   $ echo 0.1 0,1 | LC_ALL=de_DE gawk '{ print $1+1, $2+1 }'
>   1.1 1
> 
> I'm using gawk-3.1.3 and libc6-2.3.2 with linux-2.6.5.

I guess you don't have the de_DE locale, then. You can see the installed
locales with "locale -a". Here (glibc-2.3.2, Gentoo and Debian), the
problem happens also with French locales like fr_FR or fr_CA. en_US is
ok (result is "1.1 1", of course).

I also tried it on Tru64 5.1 and found that it works there:

$ echo 0.1 0,1 | LC_ALL=de_DE.ISO8859-1 ./gawk-Tru64 '{ print $1+1, $2+1 }'
1 1,1

Regards...
                Michael




reply via email to

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