run-tests: set python stdio encoding to utf-8

This commit is contained in:
Jeff Epler 2018-03-31 11:41:00 -05:00
parent ed3f0c4ff5
commit 79a686eb95

View file

@ -389,7 +389,8 @@ def run_tests(pyb, tests, args, base_path="."):
# run CPython to work out expected output
e = {"PYTHONPATH": os.getcwd(),
"PATH": os.environ["PATH"],
"LANG": "en_US.UTF-8"}
"LANG": "en_US.UTF-8",
"PYTHONIOENCODING": "utf-8"}
if 'SYSTEMROOT' in os.environ:
e['SYSTEMROOT'] = os.environ['SYSTEMROOT']
p = subprocess.Popen([CPYTHON3, '-B', test_file], env=e, stdout=subprocess.PIPE)