PR libstdc++/87642 handle multibyte thousands separators from libc
commit95e64c7d8b9064b771365510e0822100d6715e2f
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Oct 2018 19:57:25 +0000 (18 19:57 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Oct 2018 19:57:25 +0000 (18 19:57 +0000)
tree0a7d0563651b52790d3f60374000b3fd66907694
parent8f260102c8336e407315f40771de7b8f50fd93fe
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265286 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/config/locale/gnu/monetary_members.cc
libstdc++-v3/config/locale/gnu/numeric_members.cc