Closed msimmoteit-neozo closed 5 months ago
Thanks for pointing out that bug. You're right, a byte-encoded string should be decoded as a whole and not byte by byte, otherwise UTF-8 bytes that may belong together will be interpreted as separate bytes. That leads to this error.
byte_data = bytearray()
while symbol_buffer[pointer] != 0:
byte_data.append(symbol_buffer[pointer])
pointer += 1
value = byte_data.decode(encoding="utf-8")
I'm working on it and will release a corresponding patch release.
Bug has been fixed with the latest patch release v1.1.1
. Reading/Writing unicode strings in QVD tables should be possible now.
Describe the bug When a String field inside a QVD file contains non-ASCII characters, the parsed value contains characters that are not in the original string.
To Reproduce Steps to reproduce the behavior:
Expected behavior
Additional context I believe this stems from lines 434 and following from qvd.py. I think one way to parse the data into string was to use the Python bytes.decode() method.