Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

There is a bug in utf8_encode in utf8.c #42

Open
crazyyao0 opened this issue Jun 25, 2015 · 0 comments
Open

There is a bug in utf8_encode in utf8.c #42

crazyyao0 opened this issue Jun 25, 2015 · 0 comments

Comments

@crazyyao0
Copy link

    out[1] = 0x80 + (((c >> 8) & 0x1f) << 2) + ((c >> 6) & 0x3);

should be
out[1] = 0x80 + (((c >> 8) & 0xf) << 2) + ((c >> 6) & 0x3);

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

No branches or pull requests

1 participant