summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLib/platform.py2
-rw-r--r--Misc/NEWS.d/next/Library/2023-01-04-14-42-59.gh-issue-100750.iFJs5Y.rst1
2 files changed, 3 insertions, 0 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 9e9f3af..9b9d88b 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))
@@ -762,6 +763,7 @@ class _Processor:
['uname', '-p'],
stderr=subprocess.DEVNULL,
text=True,
+ encoding="utf8",
).strip()
except (OSError, subprocess.CalledProcessError):
pass
diff --git a/Misc/NEWS.d/next/Library/2023-01-04-14-42-59.gh-issue-100750.iFJs5Y.rst b/Misc/NEWS.d/next/Library/2023-01-04-14-42-59.gh-issue-100750.iFJs5Y.rst
new file mode 100644
index 0000000..be35153
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-01-04-14-42-59.gh-issue-100750.iFJs5Y.rst
@@ -0,0 +1 @@
+pass encoding kwarg to subprocess in platform