-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Update stream.md - fix issue in setEncoding method #11363
Conversation
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers.
The `readable.setEncoding()` method sets the default character encoding for | ||
data read from the Readable stream. | ||
The `readable.setEncoding()` method sets the character encoding for | ||
data read from the Readable stream. |
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.
Trailing space should be removed.
|
||
Setting an encoding causes the stream data | ||
By default, no encoding is assigned and stream data will be returned as | ||
Buffer objects. Setting an encoding causes the stream data |
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.
Double space after the period should be a single space (IMHO and to match the surrounding text).
|
||
Setting an encoding causes the stream data | ||
By default, no encoding is assigned and stream data will be returned as | ||
Buffer objects. Setting an encoding causes the stream data | ||
to be returned as string of the specified encoding rather than as `Buffer` |
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.
Can you add an 'a' before 'string' here too?
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.
and before `Buffer`
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.
Can you add an 'a' before 'string' here too?
Went with strings
and Buffers
instead (to match the rest of the paragraph).
The first line of the commit message should target the |
Probably worth adding Fixes: #11352 and Refs: #11316 lines to the commit message. With @mscdex's nit above, you could probably do this for the commit message:
cc/ @sam-github for review |
|
||
Setting an encoding causes the stream data | ||
By default, no encoding is assigned and stream data will be returned as | ||
Buffer objects. Setting an encoding causes the stream data |
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.
Can you format Buffer
as inline code.
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.
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.
LGTM when the others nits are addressed.
@RickBullotta would you mind addressing the relative nits? |
Have at it. The amount of nit picking turned me off to the whole process.
… On May 19, 2017, at 4:38 AM, Matteo Collina ***@***.***> wrote:
@RickBullotta would you mind addressing the relative nits?
Otherwise, may I land and address the nit while landing this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
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.
Will fix nits on landing.
Landed in 8476880 |
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers. PR-URL: #11363 Fixes: #11352 Refs: #11316 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
@RickBullotta I'd be really interested to get more feedback from you on this. What would your ideal process be? Questions:
There's no right answer for these things, but we're always trying to improve our process, so feedback from people just starting to get involved with the project is very helpful. |
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers. PR-URL: nodejs#11363 Fixes: nodejs#11352 Refs: nodejs#11316 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
I think it would be more effective and efficient when proposing minor changes on documentation submissions to simply have those collaborators with proposed corrections make the corrections themselves…
|
is this applicable for v6.x? |
@MylesBorins yes you can backport. |
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers. PR-URL: #11363 Fixes: #11352 Refs: #11316 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removed an incorrect reference to the use of setEncoding(null) as the proper way to handling binary streams or to disable encoding, and explained that the default encoding is "no encoding", and that this is the correct approach for dealing with binary data via Buffers.
Checklist
Affected core subsystem(s)
Affects documentation only