[Bug libstdc++/87642] Cannot handle fr_FR.UTF8 thousands separator

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 18 19:58:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87642

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Oct 18 19:57:25 2018
New Revision: 265286

URL: https://gcc.gnu.org/viewcvs?rev=265286&root=gcc&view=rev
Log:
PR libstdc++/87642 handle multibyte thousands separators from libc

If a locale's THOUSANDS_SEP or MON_THOUSANDS_SEP string is not a
single character we either need to narrow it to a single char or
ignore it (and therefore disable digit grouping for that facet).

        PR libstdc++/87642
        * config/locale/gnu/monetary_members.cc
        (moneypunct<char, true>::_M_initialize_moneypunct): Use
        __narrow_multibyte_chars to convert multibyte thousands separators
        to a single char.
        * config/locale/gnu/numeric_members.cc
        (numpunct<char>::_M_initialize_numpunct): Likewise.
        (__narrow_multibyte_chars): New function.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config/locale/gnu/monetary_members.cc
    trunk/libstdc++-v3/config/locale/gnu/numeric_members.cc


More information about the Gcc-bugs mailing list