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

Encode String not behaving well with special characters. #85

Open
ghost opened this issue Mar 3, 2016 · 0 comments
Open

Encode String not behaving well with special characters. #85

ghost opened this issue Mar 3, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2016

In encodeString() chars are checked using

if(ch.unicode() >= 32 && ch.unicode() < 128) 

If they are not within this range, some specific treatment for special characters with a switch/case are made.
Problems is that some of those special characters are within the first checked range, and so they don't get treated correctly.

Problem exists for ", / and \

Encoding following String "Hello "Mister" " will encode to "Hello "Mister" " instead of "Hello "Mister" "

Attached a suggested implementation.

Thanks again for the very usefull lib!!

qjson.zip

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

0 participants