X Tutup
Skip to content

Commit 3328ed4

Browse files
authored
Merge pull request rocky#211 from byehack/master
support utf-8 chars
2 parents 763c599 + 0c5f0df commit 3328ed4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

uncompyle6/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ def _get_outstream(outfile):
4040
except OSError:
4141
pass
4242
if PYTHON_VERSION < 3.0:
43-
mode = 'wb'
43+
return open(outfile, mode='wb')
4444
else:
45-
mode = 'w'
46-
return open(outfile, mode)
45+
return open(outfile, mode='w', encoding='utf-8')
4746

4847
def decompile(
4948
bytecode_version, co, out=None, showasm=None, showast=False,

0 commit comments

Comments
 (0)
X Tutup