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

Fixed bug where certain UCS-2 codepoints were not decoded correctly #187

Merged
merged 1 commit into from Apr 4, 2012
Merged

Fixed bug where certain UCS-2 codepoints were not decoded correctly #187

merged 1 commit into from Apr 4, 2012

Conversation

fredreichbier
Copy link
Contributor

This fixes the usage of certain characters in the chat, e.g. "ö", and it happened because there was a char that needed to be an unsigned char.
ö is the Unicode codepoint 246. In UCS-2, it is represented by the sequence 0x00 0xf6 (big endian). Without the change, the second byte is treated as a negative number, which gets really big when casted to unsigned int. Sounds fun, but I can't really explain it. :D

fador added a commit that referenced this pull request Apr 4, 2012
Fixed bug where certain UCS-2 codepoints were not decoded correctly
@fador fador merged commit 6c8af09 into fador:master Apr 4, 2012
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

Successfully merging this pull request may close these issues.

None yet

2 participants