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

doc: add documentation for invalid byte sequences #28249

Closed
wants to merge 6 commits into from

Conversation

rexagod
Copy link
Member

@rexagod rexagod commented Jun 16, 2019

added documentation on evaluating legal code points,
and the behavior that stems from it otherwise.

Fixes: #23280

Checklist

added documentation on evaluating legal code points,
and the behavior that stems from it otherwise.

Fixes: nodejs#23280
@nodejs-github-bot nodejs-github-bot added buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. labels Jun 16, 2019
doc/api/buffer.md Outdated Show resolved Hide resolved
@BridgeAR BridgeAR requested a review from Trott July 5, 2019 00:01
doc/api/buffer.md Outdated Show resolved Hide resolved
doc/api/buffer.md Outdated Show resolved Hide resolved
doc/api/buffer.md Outdated Show resolved Hide resolved
rexagod and others added 3 commits July 5, 2019 11:01
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
Co-Authored-By: Rich Trott <rtrott@gmail.com>
@Trott
Copy link
Member

Trott commented Jul 5, 2019

@nodejs/buffer


A `U+FFFD` replacement value
(representing the aforementioned replacement character) will be returned
in case of decoding errors (invalid unicode scalar values).
Copy link
Member

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?)

@addaleax
Copy link
Member

ping @rexagod?

@gireeshpunathil
Copy link
Member

ping @rexagod again

@BridgeAR
Copy link
Member

@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!

@BridgeAR BridgeAR closed this Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Buffer.toString('utf8') appears to use wtf-8
8 participants