Skip to content

Commit 37311d0

Browse files
committed
1 parent ff8d401 commit 37311d0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Mopy/bash/bolt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def decode(byte_str, encoding=None, avoidEncodings=()):
123123
# TODO(ut) monkey patch
124124
if encoding == 'cp65001':
125125
encoding = 'utf-8'
126+
codecs.register(lambda name: codecs.lookup('utf-8') if name == 'cp65001' else None)
126127
if encoding:
127128
try: return unicode(byte_str, encoding)
128129
except UnicodeDecodeError: pass

0 commit comments

Comments
 (0)