Skip to content

ByteList.toString should not be used for encoded data #909

@headius

Description

@headius

ByteList.toString seems like it should decode the bytes according to the ByteList's encoding, but instead it just decodes them using ISO-8859-1. This causes the resulting string to lose its encoded nature.

For #736, I fixed a number of places where we used toString incorrectly, modifying them to use either Helpers.decodeByteList or Helpers.byteListToString to attempt to decode the bytes properly. However, I was unsure about changing a number of places (mostly in the parser) since they are involved in deeper byte-wrangling.

Those locations need to be audited and probably fixed to not use ByteList.toString.

/cc @enebo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions