Index: Lib/distutils/command/build_scripts.py =================================================================== --- Lib/distutils/command/build_scripts.py (Revision 86466) +++ Lib/distutils/command/build_scripts.py (Arbeitskopie) @@ -74,7 +74,7 @@ # that way, we'll get accurate feedback if we can read the # script. try: - f = open(script, "r") + f = open(script, "r", errors="surrogateescape") except IOError: if not self.dry_run: raise @@ -95,7 +95,7 @@ self.build_dir) updated_files.append(outfile) if not self.dry_run: - outf = open(outfile, "w") + outf = open(outfile, "w", errors="surrogateescape") if not sysconfig.python_build: outf.write("#!%s%s\n" % (self.executable,