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

Decode numeric encodings into arbitrarily encoded std::string #10

Closed
tgockel opened this issue Sep 4, 2014 · 0 comments
Closed

Decode numeric encodings into arbitrarily encoded std::string #10

tgockel opened this issue Sep 4, 2014 · 0 comments

Comments

@tgockel
Copy link
Owner

tgockel commented Sep 4, 2014

Parsing outputs a UTF-8 encoded std::string from JSON numeric encodings (\uNNNN). This might not be what the user desires.

This is only on my radar because the workaround for this is so absurdly inconvenient for platforms that do not support output of UTF-8 encoded strings...the only workaround I can think of forces the user to convert at every string access à la convert_utf8_to_utf1(val.as_string()). That said, if every platform you'd use JsonVoorhees on supports UTF-8, this isn't worth dealing with. I'm going to wait until somebody actually cares about this to address it.

At a more general level: It might be completely pointless to support not-UTF-8 when the resultant string representation is the sequence of single bytes std::string. In Windows, where UCS-2 seems to be the norm for presentation, I should more to having strings be backed by std::wstring before addressing this sort of thing.

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

No branches or pull requests

1 participant