Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readJSON should always return valid, safe UTF-8 strings #366

Open
rajsite opened this issue Jan 2, 2018 · 0 comments
Open

readJSON should always return valid, safe UTF-8 strings #366

rajsite opened this issue Jan 2, 2018 · 0 comments

Comments

@rajsite
Copy link
Member

rajsite commented Jan 2, 2018

This is important for the Flatten and Unflatten JSON functions as they talk to external services

This is also important for interoperability with other C APIs expecting to receive valid UTF-8 byte sequences when using the readJSON function.

related discussion: #283 (comment)

It looks like when reading strings from LabVIEW, replacement characters are used on desktop. However the block diagram Flatten to JSON function instead appears to use code points U+0080-U+00FF with the same value as the byte as discussed as option 3: #283 (comment)

invalidutf8behavior

With C3BF corresponding to codepoint U+00FF

In order to closely align with desktop that means FlattenToJSON and UnflattenFromJSON should replace with a code point that has the same value as the byte. Edit: Should check if LabVIEW NXG behavior is the same, a quick test showed differences not fully characterized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant