bin/72006: floating point formating in non-C locales
Giorgos Keramidas
keramida at freebsd.org
Wed Sep 22 21:50:40 PDT 2004
The following reply was made to PR bin/72006; it has been noted by GNATS.
From: Giorgos Keramidas <keramida at freebsd.org>
To: Mikhail Teterin <mi+mxmoz at aldan.algebra.com>
Cc: bug-followup at freebsd.org
Subject: Re: bin/72006: floating point formating in non-C locales
Date: Thu, 23 Sep 2004 07:40:49 +0300
On 2004-09-22 16:51, Mikhail Teterin <mi+mxmoz at aldan.algebra.com> wrote:
> > en_US locale Greek locale
> > 1,000.00 1.000,00
> > 2,000,000.00 2.000.000,00
>
> These numbers are not parsable one way or the other -- the "thousand
> separators" are not, AFAIK, supported at all:
>
> printf: 2.000.011
> printf: 2.000.011: not completely converted
> 2
True, but partial support already exists for producing these numbers
with the %'f format of printf:
$ env | egrep -e 'LANG|LC_'
LC_ALL=en_US.ISO8859-1
LANG=en_US
$ printf "%'.02f\n" 12345678
12,345,678.00
So we might want to avoid treating . as an equivalent of the thousands
separator, in case someone comes up with a good way to implement any
functionality we currently might not have.
More information about the freebsd-bugs
mailing list