-
Notifications
You must be signed in to change notification settings - Fork 281
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
Add support for UTF-32 #216
Conversation
…er versions of Node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you Kerry! Left a few comments inline and I'll be happy to merge when its ready.
I've made pretty much all of the changes you've suggested (I'm not sure if the all-codepoint unit tests are exactly what you had in mind), but now there are problems with compatibility with older versions of Node to try to figure out. One of them looks serious, " offset is not uint" on the use of "Buffer.readUInt32BE". |
Problems with older versions of Node sorted out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! see just one more comment inline.
Awesome, thank you Kerry! I'll cut a new version and upload it to npm soon. |
This adds support for UTF-32 (also using the alias UCS-4), both little-endian and big-endian. UTF32-LE and UTF32-BE can be selected specifically, or a general UTF-32 codec with BOM-based and content-based automatic detection can be used.