pynbs
pynbs copied to clipboard
pynbs fails to parse files with invalid CP1252 characters
Commit 05efe721714eedca0c02d35eecf02d129ecc7707 changed the decoding of string bytes to use CP1252. Since NBS has an issue where it only saves the first byte of each character's UTF-16 representation (see https://github.com/OpenNBS/OpenNoteBlockStudio/issues/307), this change was implemented to match its behavior, which manages to load files successfully despite showing corrupted characters.
However, CP1252 still has undefined codepoints, which, if present, still result in an exception while trying to parse the file:
From the Open Note Block Studio Discord: