From 46654094beefb6d41cad477fc63e8ddbaa5387a2 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 26 Jul 2026 16:45:39 +0100 Subject: [PATCH] lint: Use C.UTF-8 locale only in shell scripts --- test/lint/lint-shell-locale.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/lint/lint-shell-locale.py b/test/lint/lint-shell-locale.py index 69b808489c5..b77812f0e72 100755 --- a/test/lint/lint-shell-locale.py +++ b/test/lint/lint-shell-locale.py @@ -5,8 +5,8 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ -Make sure all shell scripts explicitly opt out of locale dependence using -"export LC_ALL=C" or "export LC_ALL=C.UTF-8", which also enables UTF-8 mode in +Make sure all shell scripts explicitly opt out of locale dependence +using "export LC_ALL=C.UTF-8", which also enables UTF-8 mode in Python. See: https://docs.python.org/3/library/os.html#python-utf-8-mode """ @@ -15,7 +15,6 @@ import sys import re OPT_OUT_LINES = [ - 'export LC_ALL=C', 'export LC_ALL=C.UTF-8', ] @@ -51,7 +50,7 @@ def main(): first_non_comment_line = non_comment_lines[0] if first_non_comment_line not in OPT_OUT_LINES: - print(f'Missing "export LC_ALL=C" (to avoid locale dependence) as first non-comment non-empty line in {file_path}') + print(f'Missing "export LC_ALL=C.UTF-8" (to avoid locale dependence) as first non-comment non-empty line in {file_path}') exit_code = 1 return sys.exit(exit_code)