diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp @@ -11,7 +11,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // REQUIRES: locale.fr_FR.UTF-8 @@ -53,11 +52,12 @@ : Fw(refs) {} }; -// GLIBC 2.27 and newer use U2027 (narrow non-breaking space) as a thousands sep. -// this function converts the spaces in string inputs to that character if need -// be. FreeBSD's locale data also uses U2027 since 2018. +// GLIBC 2.27 and newer use U+202F NARROW NO-BREAK SPACE as a thousands separator. +// This function converts the spaces in string inputs to U+202F if need +// be. FreeBSD's locale data also uses U+202F, since 2018. +// Windows uses U+00A0 NO-BREAK SPACE. static std::wstring convert_thousands_sep(std::wstring const& in) { -#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) +#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) || defined(_WIN32) #if defined(_CS_GNU_LIBC_VERSION) if (glibc_version_less_than("2.27")) return in; @@ -72,7 +72,11 @@ continue; } assert(in[I] == L' '); +#if defined(_WIN32) + out.push_back(L'\u00A0'); +#else out.push_back(L'\u202F'); +#endif } return out; #else diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp @@ -11,7 +11,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // REQUIRES: locale.fr_FR.UTF-8 @@ -53,11 +52,12 @@ : Fw(refs) {} }; -// GLIBC 2.27 and newer use U2027 (narrow non-breaking space) as a thousands sep. -// this function converts the spaces in string inputs to that character if need -// be. FreeBSD's locale data also uses U2027 since 2018. +// GLIBC 2.27 and newer use U+202F NARROW NO-BREAK SPACE as a thousands separator. +// This function converts the spaces in string inputs to U+202F if need +// be. FreeBSD's locale data also uses U+202F, since 2018. +// Windows uses U+00A0 NO-BREAK SPACE. static std::wstring convert_thousands_sep(std::wstring const& in) { -#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) +#if defined(_CS_GNU_LIBC_VERSION) || defined(__FreeBSD__) || defined(_WIN32) #if defined(_CS_GNU_LIBC_VERSION) if (glibc_version_less_than("2.27")) return in; @@ -74,7 +74,11 @@ continue; } assert(in[I] == L' '); +#if defined(_WIN32) + out.push_back(L'\u00A0'); +#else out.push_back(L'\u202F'); +#endif } return out; #else diff --git a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp --- a/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp @@ -9,8 +9,6 @@ // NetBSD does not support LC_MONETARY at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME - // REQUIRES: locale.en_US.UTF-8 // REQUIRES: locale.fr_FR.UTF-8 // REQUIRES: locale.ru_RU.UTF-8 @@ -114,6 +112,8 @@ #ifndef TEST_HAS_NO_WIDE_CHARACTERS #if defined(_CS_GNU_LIBC_VERSION) const wchar_t fr_sep = glibc_version_less_than("2.27") ? L' ' : L'\u202F'; +#elif defined(_WIN32) + const wchar_t fr_sep = L'\u00A0'; #else const wchar_t fr_sep = L' '; #endif @@ -144,6 +144,8 @@ // FIXME libc++ specifically works around \u00A0 by translating it into // a regular space. const wchar_t wsep = glibc_version_less_than("2.27") ? L'\u00A0' : L'\u202F'; +# elif defined(_WIN32) + const wchar_t wsep = L'\u00A0'; # else const wchar_t wsep = L' '; # endif diff --git a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp --- a/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp +++ b/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp @@ -9,7 +9,6 @@ // NetBSD does not support LC_NUMERIC at the moment // XFAIL: netbsd -// XFAIL: LIBCXX-WINDOWS-FIXME // XFAIL: LIBCXX-AIX-FIXME // REQUIRES: locale.en_US.UTF-8 @@ -64,7 +63,7 @@ // The below tests work around GLIBC's use of U202F as LC_NUMERIC thousands_sep. std::locale l(LOCALE_fr_FR_UTF_8); { -#if defined(_CS_GNU_LIBC_VERSION) +#if defined(_CS_GNU_LIBC_VERSION) || defined(_WIN32) const char sep = ' '; #else const char sep = ','; @@ -77,6 +76,8 @@ { #if defined(_CS_GNU_LIBC_VERSION) const wchar_t wsep = glibc_version_less_than("2.27") ? L' ' : L'\u202f'; +#elif defined(_WIN32) + const wchar_t wsep = L'\u00A0'; #else const wchar_t wsep = L','; #endif