diff --git a/obd/decoders.py b/obd/decoders.py index fffca50a..4a7c5e3b 100644 --- a/obd/decoders.py +++ b/obd/decoders.py @@ -505,7 +505,8 @@ def decode_encoded_string(messages, length): # Encoded strings come in bundles of messages with leading null values to # pad out the string to the next full message size. We strip off the # leading null characters here and return the resulting string. - return d.strip().strip(b'\x00' b'\x01' b'\x02' b'\\x00' b'\\x01' b'\\x02') + decoded_string = d.strip().replace(b'\x00', b'').replace(b'\x01', b'').replace(b'\x02', b'').replace(b'\\x00', b'').replace(b'\\x01', b'').replace(b'\\x02', b'') + return decoded_string def cvn(messages):