Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix fallback
  • Loading branch information
methane committed Dec 3, 2019
commit b582067408cfd187fe4faf82c1d4cb9d6ef03416
2 changes: 1 addition & 1 deletion msgpack/fallback.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def _unpack(self, execute=EX_CONSTRUCT):
elif self._raw:
obj = bytes(obj)
else:
obj = obj.decode('utf_8')
obj = obj.decode('utf_8', self._unicode_errors)
return obj
if typ == TYPE_EXT:
return self._ext_hook(n, bytes(obj))
Expand Down
3 changes: 2 additions & 1 deletion test/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def testPackByteArrays():
check(td)

def testIgnoreUnicodeErrors():
re = unpackb(packb(b'abc\xeddef', use_bin_type=False), raw=False, unicode_errors='ignore', use_list=1)
re = unpackb(packb(b'abc\xeddef', use_bin_type=False),
raw=False, unicode_errors='ignore')
assert re == "abcdef"

def testStrictUnicodeUnpack():
Expand Down