Skip to content

Commit

Permalink
Merge pull request #153 from ivanyu/ivanyu/handle-utfencoding-errors
Browse files Browse the repository at this point in the history
ui: handle UTF-8 encoding errors
  • Loading branch information
ivanyu authored Nov 13, 2022
2 parents 96c8eeb + 5ae8b82 commit 5a6031d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyheap-ui/src/pyheap_ui/heap_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def _read_string_with_known_length(self, length: int) -> str:
r = struct.unpack_from(fmt, self._buf, self._offset)[0]
self._offset += struct.calcsize(fmt)

return r.decode("utf-8")
return r.decode("utf-8", "backslashreplace")

@cache
def _get_string_struct(self, length: int) -> struct.Struct:
Expand Down

0 comments on commit 5a6031d

Please sign in to comment.