[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: |
Wed, 12 Jan 2011 11:19:09 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Thanks for the confirmation. I opened a glibc bug on this.
http://sourceware.org/bugzilla/show_bug.cgi?id=12394
Here is some sample code to demonstrate the problem (attached to the bug
report):
#include <stdio.h>
#include <locale.h>
int
main(void)
{
double x;
setlocale(LC_NUMERIC, "");
while (scanf("%lf",&x) == 1)
printf("%'.2f\n",x);
return 0;
}
Regards,
Andy