[clang] [llvm] [llvm-strings] Add --encoding={s, S, utf8} option (PR #221794)
Harald van Dijk via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 13:50:40 PST 2026
================
@@ -0,0 +1,16 @@
+import locale
+
+saved = locale.setlocale(locale.LC_ALL)
+for l in (
+ "en_US.US-ASCII",
+ "en_US.ISO8859-1",
+ "en_US.UTF-8",
+ "ja_JP.SJIS",
+ "ja_JP.ISO2022-JP",
----------------
hvdijk wrote:
This actually isn't based on glibc, it's based on FreeBSD and macOS (except for `ja_JP.ISO2022-JP` which is NetBSD), and ensures that it does meaningful locale testing in CI, since we have macOS runners. On systems where the locales are not available, or available with other names, the test should be skipped and not cause any issues.
I'd happily add other alternative names for the same locales to the test if you can confirm that it passes.
https://github.com/llvm/llvm-project/pull/221794
More information about the cfe-commits
mailing list