From f314e991cac8c7359725119de7cc7da98c93ad83 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 9 Feb 2025 16:35:26 -0800 Subject: [PATCH] generate_expected_output.py: suppress annoying warning about non-UTF8 On my system, en_US.UTF-8 is apparently not properly detected, causing the warning about running on a non-UTF8 locale to be printed. I don't understand why because strace shows that the proper locale file was opened: openat(AT_FDCWD, "/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = 3 And it doesn't get printed when running the tests manually, only when running with the python script. Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8. Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead. If this causes problems, reconfigure your locale. See the locale(1) manual for more information. Change-Id: I0ea60c82852bc3039952fffdd9136ed4ada43158 Reviewed-by: Edward Welbourne --- tests/auto/testlib/selftests/generate_expected_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 9f7bca678fe..446cc6a8b86 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -239,7 +239,7 @@ def baseEnv(platname=None, keep += preserveLib cached = dict( - LC_ALL = 'en-US.UTF-8', # Use standard locale + LC_ALL = 'C.UTF-8', # Use standard locale # Avoid interference from any qtlogging.ini files, e.g. in # /etc/xdg/QtProject/, (must match tst_selftests.cpp's # processEnvironment()'s value):