Skip to content

pynbs fails to parse files with invalid CP1252 characters #22

@Bentroen

Description

@Bentroen

Commit 05efe72 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 OpenNBS/NoteBlockStudio#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:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions