[libcxx-commits] [PATCH] D119930: [libcxx] [test] Use proper UTF-8 locales on Windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 16 03:41:23 PST 2022


mstorsjo created this revision.
mstorsjo added a reviewer: Mordante.
Herald added a subscriber: krytarowski.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

Since Windows 10 version 1803 (10.0.17134.0) (or Windows Server 2019),
the Windows Universal C Runtime (UCRT) actually does support UTF-8
locales - they're available e.g. via the same names as commonly on Unices,
e.g. "en_US.UTF-8".

The UTF-8 locale support unfortunately has a bug which breaks a couple
tests that were passing previously. That bug is fixed in the very
latest version of the UCRT (in UCRT 10.0.20348.0, available in Windows
11 or Windows Server 2022), so it will get resolved at some point
eventually, provided that the CI environment does get upgraded to a
newer version of Windows Server.

While the net number of xfailed/passing tests in this patch is a loss,
this does allow fixing a lot more locale tests properly for Windows
in later patches.

Intentionally not touching the ISO-8859-1/2 locales used for testing;
they're not detected and tested/used right now, and fixing that up
is another project.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119930

Files:
  libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
  libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
  libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
  libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
  libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
  libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
  libcxx/test/support/platform_support.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119930.409200.patch
Type: text/x-patch
Size: 8080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220216/15e4535c/attachment.bin>


More information about the libcxx-commits mailing list