llvm-project/libcxx
Eric Fiselier 0d542d350d [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname.
Summary:
The underlying C locales provide the `thousands_sep` and `decimal_point` as strings, possible with more than one character. We currently don't handle this case even for `wchar_t`.

This patch properly converts the mbs -> wide character for `moneypunct_byname<wchar_t>`. For the `moneypunct_byname<char>` case we attempt to narrow the WC and if that fails we also attempt to translate it to some reasonable value. For example we translate U00A0 (non-breaking space) into U0020 (regular space). If none of these conversions succeed then we simply allow the base class to provide a fallback value.


Reviewers: mclow.lists, EricWF

Subscribers: vangyzen, george.burgess.iv, cfe-commits

Differential Revision: https://reviews.llvm.org/D24218

llvm-svn: 289347
2016-12-11 00:20:59 +00:00
..
benchmarks Optimize filesystem::path by providing weaker exception guarantees. 2016-10-31 02:46:25 +00:00
cmake Put C++ ABI headers in a special build directory instead of the top level. 2016-12-09 09:31:01 +00:00
docs Update doc version to 4.0 2016-12-09 12:33:49 +00:00
include Fix missing const on set::count. Patch from Andrey Khalyavin 2016-12-09 12:17:31 +00:00
lib Update darwin ABI list for <variant> 2016-12-02 23:14:18 +00:00
src [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname. 2016-12-11 00:20:59 +00:00
test [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname and numpunct_byname. 2016-12-11 00:20:59 +00:00
utils Make LIBCXX_ENABLE_STATIC_ABI_LIBRARY merge libc++.a and libc++abi.a 2016-11-18 19:53:45 +00:00
www Update status page for variant implementation 2016-12-04 22:14:53 +00:00
.arcconfig Upgrade arcconfig to use https 2016-07-18 02:02:49 +00:00
.clang-format fix misspelling in .clang-format 2016-12-09 03:18:45 +00:00
.gitignore Implement N4606 optional 2016-10-12 07:46:20 +00:00
CMakeLists.txt [libc++] Add _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS 2016-12-05 19:40:12 +00:00
CREDITS.TXT Add entry to CREDITS.TXT for propagate_const 2016-06-19 19:36:28 +00:00
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:39:53 +00:00
TODO.TXT Remove out of date items in TODO.txt 2016-09-27 01:28:47 +00:00