[all-commits] [llvm/llvm-project] 38d25a: [libcxx] [test] Use proper UTF-8 locales on Windows

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Feb 17 14:03:55 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38d25aecdf72177d72ed40f3dfbbf1d3c726dc8f
      https://github.com/llvm/llvm-project/commit/38d25aecdf72177d72ed40f3dfbbf1d3c726dc8f
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M libcxx/test/libcxx/selftest/dsl/dsl.sh.py
    M libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/overflow.pass.cpp
    M libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/underflow.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_1.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/tolower_many.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_1.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/toupper_many.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
    M libcxx/test/std/re/re.traits/translate_nocase.pass.cpp
    M libcxx/test/support/platform_support.h
    M libcxx/utils/libcxx/test/dsl.py
    M libcxx/utils/libcxx/test/features.py

  Log Message:
  -----------
  [libcxx] [test] Use proper UTF-8 locales on Windows

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.

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




More information about the All-commits mailing list