------- Comment #9 from jakub at gcc dot gnu dot org 2008-12-05 09:10 -------
Forcing "," thousands separator when none should be used is very weird. Does
C++ standard mandate that behavior? "" means thousands shouldn't be separated
by any separator. In most cases such locales also have grouping 0;0 or -1, but
there
are buggy? locales, e.g. bg_BG, that specify empty thousands_sep, yet have
grouping 3;3. For empty thousands_sep glibc just forces no grouping:
if ((wide && thousands_sepwc == L'\0')
|| (! wide && *thousands_sep == '\0'))
grouping = NULL;
BTW, thousands_sep is a multibyte string, it can be multiple bytes (or none, as
discussed here). Say ru_RU has:
"<U2002>"
which is 3 bytes:
<U2002> /xe2/x80/x82 EN SPACE
and a bunch of locales are using "<U00A0>", which is 2 bytes:
<U00A0> /xc2/xa0 NO-BREAK SPACE
_NL_NUMERIC_THOUSANDS_SEP_WC is always just one wchar_t though.
thousands_sep is one of the things that changed in fr_FR this year, see
sourceware #6040.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38411