[PATCH] D24218: [libc++] Fix support for multibyte thousands_sep and decimal_point in moneypunct_byname

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 3 17:52:22 PDT 2016


EricWF created this revision.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.

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>`.  It doesn't handle the case for `moneypunct_byname<char>` because it's not clear what to do.

Note that the changes to `curr_symbol.pass.cpp` are just drive by fixes.

https://reviews.llvm.org/D24218

Files:
  src/locale.cpp
  test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
  test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
  test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
  test/support/test_macros.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24218.70276.patch
Type: text/x-patch
Size: 8861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160904/6d7e35b2/attachment.bin>


More information about the cfe-commits mailing list