Index: Lib/trace.py =================================================================== --- Lib/trace.py (revision 86193) +++ Lib/trace.py (working copy) @@ -340,7 +340,7 @@ """Return a coverage results file in path.""" try: - outfile = open(path, "w") + outfile = open(path, "w", encoding="utf-8") except IOError as err: print(("trace: Could not open %r for writing: %s" "- skipping" % (path, err)), file=sys.stderr)