[llvm] [llvm-strings] Add --encoding={s,S,u} option (PR #221794)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 04:03:53 PDT 2026
================
@@ -0,0 +1,28 @@
+## Show that llvm-strings uses the specified encoding.
+
+RUN: echo a > %t
+RUN: echo ab >> %t
+RUN: echo abc >> %t
+RUN: echo abcd >> %t
+RUN: echo abcd€ >> %t
----------------
hvdijk wrote:
> Otherwise, the encoding of the Euro sign will vary depending on the encoding of this file (in particular, if this file is saved on Windows it's likely to be in local code page encoding, instead of UTF-8 for Linux users).
It doesn't work that way, Git doesn't convert between code pages, Git only changes line endings. Windows users will also always get an UTF-8 encoded file.
I don't mind making that change if it means we get a pure ASCII file, but I think `FileCheck` doesn't support the same, we need a literal `€` in the file anyway, or is there an option there I'm missing?
https://github.com/llvm/llvm-project/pull/221794
More information about the llvm-commits
mailing list