From a2c52d1ca9a470d6eb7b4149f719743b4ef0d8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arvid=20M=C3=BCllern-Aspegren?= Date: Wed, 13 Sep 2023 16:25:02 +0200 Subject: [PATCH 1/2] Use an UTF8 enabled locale for the run() environment. --- src/setuptools_scm/_run_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py index b1e5f1ab..e6cf8c4f 100644 --- a/src/setuptools_scm/_run_cmd.py +++ b/src/setuptools_scm/_run_cmd.py @@ -143,7 +143,7 @@ def run( avoid_pip_isolation(no_git_env(os.environ)), # os.environ, # try to disable i18n - LC_ALL="C", + LC_ALL="C.UTF-8", LANGUAGE="", HGPLAIN="1", ), From 59b5156f47f5bff1592eed52f7ad23d1c0dc24b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arvid=20M=C3=BCllern-Aspegren?= Date: Wed, 13 Sep 2023 16:50:58 +0200 Subject: [PATCH 2/2] Changelog and comment. --- CHANGELOG.rst | 1 + src/setuptools_scm/_run_cmd.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cb057075..70c92ee6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -44,6 +44,7 @@ bugfixes * fix #883: use HeadersParser to ensure only mime metadata in headers is used * fix #884: parse calver dates from versions with the v prefix +* don't use a C locale without UTF-8 support, when running commands. v7.1.0 ====== diff --git a/src/setuptools_scm/_run_cmd.py b/src/setuptools_scm/_run_cmd.py index e6cf8c4f..3c938d81 100644 --- a/src/setuptools_scm/_run_cmd.py +++ b/src/setuptools_scm/_run_cmd.py @@ -142,7 +142,7 @@ def run( env=dict( avoid_pip_isolation(no_git_env(os.environ)), # os.environ, - # try to disable i18n + # try to disable i18n, but still allow UTF-8 encoded text. LC_ALL="C.UTF-8", LANGUAGE="", HGPLAIN="1",