[Bug libstdc++/16006] Conversions of numbers in fi_FI.UTF-8 produces incorrect UTF-8

olau at hardworking dot dk gcc-bugzilla@gcc.gnu.org
Wed Jun 16 14:18:00 GMT 2004


------- Additional Comments From olau at hardworking dot dk  2004-06-16 14:17 -------
The %'d is to make it output the thousands separator. Look in the glibc manual:

`''
     Separate the digits into groups as specified by the locale
     specified for the `LC_NUMERIC' category; *note General Numeric::.
     This flag is a GNU extension.

I'm not sure how you do it otherwise in C. But about the bug. You are wrong -
the output is _not_ OK. It is not UTF-8. Run the program with .ISO-8859-1
instead of .UTF-8, and you get the non-breaking space in .ISO-8859-1. Then put
that character through iconv from ISO-8859-1 to UTF-8 and you get _two_
characters, not one (in fact it could not possible be just one character when
it's UTF-8).

So glibc is right (produces correct UTF-8 non-breaking space) and libstdc++ is
wrong (produces incorrect UTF-8 non-breaking space). The invalid UTF-8 from
libstdc++ makes my GTK+ program die horrible.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16006



More information about the Gcc-bugs mailing list