[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: locale-related printf bug when using formats with thousands grouping
From: |
Andrew J. Schorr |
Subject: |
Re: locale-related printf bug when using formats with thousands grouping character |
Date: |
Tue, 11 Jan 2011 22:40:17 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jan 11, 2011 at 10:31:26PM -0500, Andrew J. Schorr wrote:
> Using gawk 3.1.8 on Fedora 13 64-bit linux, I see this:
>
> bash-4.1$ (echo 1000000; echo 999999.9998071828) | gawk -v "sq='" '{printf
> "%" sq ".2f\n", $1}'
> 1,000,000.00
> ,000,000.00
Actually, this may be a glibc bug:
bash-4.1$ printf "%'.2f\n" 999999.9998071828
,000,000.00
bash-4.1$ printf "%'.2f\n" 1000000
1,000,000.00
bash-4.1$ uname -a
Linux ti93 2.6.34.6-54.fc13.x86_64 #1 SMP Sun Sep 5 17:16:27 UTC 2010 x86_64
x86_64 x86_64 GNU/Linux
bash-4.1$ rpm -q glibc
glibc-2.12.1-4.x86_64
I will investigate further.
Regards,
Andy
- locale-related printf bug when using formats with thousands grouping character, Andrew J. Schorr, 2011/01/11
- Re: locale-related printf bug when using formats with thousands grouping character,
Andrew J. Schorr <=
- Re: locale-related printf bug when using formats with thousands grouping character, Eric Blake, 2011/01/12
- Re: locale-related printf bug when using formats with thousands grouping character, Jim Meyering, 2011/01/12
- Re: locale-related printf bug when using formats with thousands grouping character, Andrew J. Schorr, 2011/01/12
- Re: locale-related printf bug when using formats with thousands grouping character, Bruno Haible, 2011/01/12
- Re: locale-related printf bug when using formats with thousands grouping character, Jim Meyering, 2011/01/13
- Re: locale-related printf bug when using formats with thousands grouping character, Jim Meyering, 2011/01/13