summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/lib2to3/pgen2/pgen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/lib2to3/pgen2/pgen.py b/Lib/lib2to3/pgen2/pgen.py
index b0cbd16..7abd5ce 100644
--- a/Lib/lib2to3/pgen2/pgen.py
+++ b/Lib/lib2to3/pgen2/pgen.py
@@ -12,7 +12,7 @@ class ParserGenerator(object):
def __init__(self, filename, stream=None):
close_stream = None
if stream is None:
- stream = open(filename)
+ stream = open(filename, encoding="utf-8")
close_stream = stream.close
self.filename = filename
self.stream = stream