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