done = {}
notdone = {}
- with open(filename, errors="surrogateescape") as f:
+ with open(filename, encoding=sys.getfilesystemencoding(),
+ errors="surrogateescape") as f:
lines = f.readlines()
for line in lines:
# load the installed pyconfig.h:
config_h = get_config_h_filename()
try:
- with open(config_h) as f:
+ with open(config_h, encoding="utf-8") as f:
parse_config_h(f, vars)
except OSError as e:
msg = "invalid Python installation: unable to open %s" % config_h