Skip to content

Commit

Permalink
ui: handle UTF-8 encoding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanyu committed Nov 13, 2022
1 parent 96c8eeb commit 5ae8b82
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 5ae8b82

Please sign in to comment.