This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/16006] Conversions of numbers in fi_FI.UTF-8 produces incorrect UTF-8
- From: "olau at hardworking dot dk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2004 14:18:03 -0000
- Subject: [Bug libstdc++/16006] Conversions of numbers in fi_FI.UTF-8 produces incorrect UTF-8
- References: <20040615164842.16006.olau@hardworking.dk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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