Skip to content

Commit 2f4e69a

Browse files
committed
Assume utf8 encoding (fixes #888)
If there is no encoding specified, the default encoding in Python 3 is utf8.
1 parent 34f0e70 commit 2f4e69a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/inspection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def get_encoding(obj):
326326
m = get_encoding_line_re.search(line)
327327
if m:
328328
return m.group(1)
329-
return "ascii"
329+
return "utf8"
330330

331331

332332
def get_encoding_file(fname):
@@ -337,7 +337,7 @@ def get_encoding_file(fname):
337337
match = get_encoding_line_re.search(line)
338338
if match:
339339
return match.group(1)
340-
return "ascii"
340+
return "utf8"
341341

342342

343343
def getattr_safe(obj, name):

0 commit comments

Comments
 (0)