We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bc25ec commit 3d4af4aCopy full SHA for 3d4af4a
Lib/sysconfig.py
@@ -240,7 +240,8 @@ def _parse_makefile(filename, vars=None):
240
done = {}
241
notdone = {}
242
243
- with open(filename, errors="surrogateescape") as f:
+ with open(filename, encoding=sys.getfilesystemencoding(),
244
+ errors="surrogateescape") as f:
245
lines = f.readlines()
246
247
for line in lines:
@@ -388,7 +389,7 @@ def _generate_posix_vars():
388
389
# load the installed pyconfig.h:
390
config_h = get_config_h_filename()
391
try:
- with open(config_h) as f:
392
+ with open(config_h, encoding="utf-8") as f:
393
parse_config_h(f, vars)
394
except OSError as e:
395
msg = "invalid Python installation: unable to open %s" % config_h
0 commit comments