Skip to content

Is this intended? #711

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

Closed
yuwenyong opened this issue Dec 15, 2017 · 6 comments
Closed

Is this intended? #711

yuwenyong opened this issue Dec 15, 2017 · 6 comments
Assignees
Labels

Comments

@yuwenyong
Copy link

I'm reading source code recently.In function "utf8ToCodepoint" contains code below(almost line 202 in json_writer.cpp):
if (calculated >= 0xD800 && calculated >= 0xDFFF) return REPLACEMENT_CHARACTER;
It seems first condition is redundant. Should second condition be less equal? Is this intended?

@cdunn2001
Copy link
Contributor

@yuwenyong
Copy link
Author

I am looking at the code follow your link and it's the same version as mine.The "problem code" is in the 201 line.

@cdunn2001
Copy link
Contributor

@yuwenyong, thanks for following up. There seems to be a bug in #687. I'll give the author some time to respond, but if you'd like, go ahead and submit a pull-request with your proposed fix.

@wenlian
Copy link

wenlian commented Dec 18, 2017

it may cause some chinese punctuation transcoding get wrong code, such as: , (0xFF0C) ? (0xFF1F) ! (0xFF01) ; (0xFF1B) ...

@pkierski
Copy link
Contributor

Sorry for late response. It's a bug, #712 resolves it.

@cdunn2001
Copy link
Contributor

Fixed by #712/#714.

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

No branches or pull requests

4 participants