From 2be3f34f2ca4f0342684d1b3e9d163770e8c20c6 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 25 Oct 2025 08:30:13 +0200 Subject: [PATCH] Remove more obsolete uses of LC_CTYPE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our test driver unsets all LC_* variables as well as LANGUAGE, and it sets LANG=C, to make errors show up as set_color: Unknown color 'reset' rather than set_color: Unknown color “reset” It also sets LC_CTYPE which is hardly necessary since c8001b5023a (encoding: use UTF-8 everywhere, 2025-10-18). The only place where we need it seems to be the use of GNU sed as called in tests/checks/sphinx-markdown-changelog.fish. In future we might want to avoid these issues by setting LANG=C.UTF-8 in the test_driver again. --- build_tools/release-notes.sh | 2 +- tests/test_driver.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tools/release-notes.sh b/build_tools/release-notes.sh index ee4c8a673..05c99123c 100755 --- a/build_tools/release-notes.sh +++ b/build_tools/release-notes.sh @@ -62,7 +62,7 @@ previous_minor_version=${previous_version%.*} if [ "$minor_version" != "$previous_minor_version" ]; then { JoinEscaped() { - sed 's/\S/\\&/g' | + LC_CTYPE=C.UTF-8 sed 's/\S/\\&/g' | awk ' NR != 1 { printf ",\n" } { printf "%s", $0 } diff --git a/tests/test_driver.py b/tests/test_driver.py index c4b2bb1b5..a75dbd6f7 100755 --- a/tests/test_driver.py +++ b/tests/test_driver.py @@ -86,7 +86,6 @@ def makeenv(script_path: Path, home: Path) -> Dict[str, str]: "XDG_CACHE_HOME": str(xdg_cache), "fish_test_helper": str(home.parent / "fish_test_helper"), "LANG": "C", - "LC_CTYPE": "en_US.UTF-8", } )