Skip to content

writeString in UBJOutputStream:200 fails on special characters #2

Description

@Jegp

Hope you don't mind me posting an issue here. Thanks for publishing your work!

I found a bug when writing strings in the UBJOutputStream. In line 205 the length of the string is potentially wrong, since the size of a byte-array encoded from a String is greater than the size of the string - when the string contains special characters. So "abc" will have the correct size of 3, while "æøå" (danish characters) will require extra bytes to store.

I don't know if there is a fix for it without encoding the string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions