From e18da8561dc0cf30f500a05524a3077ad4ab1bb2 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Wed, 4 Jan 2023 14:32:40 +0000 Subject: [PATCH] gh-100750: pass encoding='locale' kwarg in lib/platform.py --- Lib/platform.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/platform.py b/Lib/platform.py index b018046f5268d1..b4ef0e547bf0c6 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -285,6 +285,7 @@ def _syscmd_ver(system='', release='', version='', stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL, text=True, + encoding="locale", shell=True) except (OSError, subprocess.CalledProcessError) as why: #print('Command %s failed: %s' % (cmd, why)) @@ -824,6 +825,7 @@ def from_subprocess(): ['uname', '-p'], stderr=subprocess.DEVNULL, text=True, + encoding="locale", ).strip() except (OSError, subprocess.CalledProcessError): pass