We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 976b197 commit 48fabc4Copy full SHA for 48fabc4
1 file changed
udsoncan/common/DidCodec.py
@@ -67,7 +67,7 @@ def encode(self, string_ascii: Any) -> bytes: # type: ignore
67
return string_ascii.encode('ascii')
68
69
def decode(self, string_bin: bytes) -> Any:
70
- string_ascii = string_bin.decode('ascii')
+ string_ascii = string_bin.decode(encoding='ascii', errors="replace")
71
if len(string_ascii) != self.string_len:
72
raise ValueError('Trying to decode a string of %d bytes but codec expects %d bytes' % (len(string_ascii), self.string_len))
73
return string_ascii
0 commit comments