WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

writeString in UBJOutputStream:200 fails on special characters #2

@Jegp

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions