-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc: add documentation for invalid byte sequences #28249
Conversation
added documentation on evaluating legal code points, and the behavior that stems from it otherwise. Fixes: nodejs#23280
Co-Authored-By: Rich Trott <[email protected]>
Co-Authored-By: Rich Trott <[email protected]>
Co-Authored-By: Rich Trott <[email protected]>
@nodejs/buffer |
|
||
A `U+FFFD` replacement value | ||
(representing the aforementioned replacement character) will be returned | ||
in case of decoding errors (invalid unicode scalar values). |
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.
To be honest, I don’t understand most of the text or its relevance here… the text basically says that invalid UTF-8 byte sequences will be decoded into U+FFFD
replacement characters and that no error will be thrown in those cases, right?
How do UTF-16 and ASCII relate to that? What does “non-legal Unicode value” mean? (I would guess that this refers to characters that would be beyond U+10FFFF – if that’s correct, can you clarify that in the text?)
ping @rexagod? |
ping @rexagod again |
@rexagod thank you very much for your contribution. I am closing this, since there was no follow-up on the comment. Please open a new PR or leave a comment in case you would like to continue working on this! |
added documentation on evaluating legal code points,
and the behavior that stems from it otherwise.
Fixes: #23280
Checklist