summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/pythoninfo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/pythoninfo.py b/Lib/test/pythoninfo.py
index cfd7ac2..d15a11c 100644
--- a/Lib/test/pythoninfo.py
+++ b/Lib/test/pythoninfo.py
@@ -731,9 +731,12 @@ def collect_windows(info_add):
import subprocess
try:
+ # When wmic.exe output is redirected to a pipe,
+ # it uses the OEM code page
proc = subprocess.Popen(["wmic", "os", "get", "Caption,Version", "/value"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
+ encoding="oem",
text=True)
output, stderr = proc.communicate()
if proc.returncode: