doc: document switchover from measured bytes to chars after setEncoding#13442
doc: document switchover from measured bytes to chars after setEncoding#13442jalafel wants to merge 1 commit intonodejs:masterfrom
Conversation
doc/api/stream.md
Outdated
There was a problem hiding this comment.
It seems this line exceeds 80 characters limit.
doc/api/stream.md
Outdated
There was a problem hiding this comment.
Maybe these empty lines are unintentional?
doc/api/stream.md
Outdated
There was a problem hiding this comment.
I think we are unofficially targeting US English, so s/behaviour/behavior.
doc/api/stream.md
Outdated
doc/api/stream.md
Outdated
There was a problem hiding this comment.
I think 'atypically' here should be 'typically'?
|
Also, the first line of the commit message is too long. |
0231823 to
9205f3f
Compare
|
@jessicaquynh This needs to be rebased, sorry for the delay. |
|
Ping @jessicaquynh this needs a rebase |
|
@BridgeAR Sorry! Didn't realize that was on me. Thank you! |
doc/api/stream.md
Outdated
There was a problem hiding this comment.
I think the casing for the parameter type should stay the same.
doc/api/stream.md
Outdated
doc/api/stream.md
Outdated
There was a problem hiding this comment.
Perhaps italicize the word 'characters' here as well since it is done for the word 'bytes' in the previous sentence.
doc/api/stream.md
Outdated
There was a problem hiding this comment.
This sentence seems a little confusing to me since we're comparing a multi-byte encoding and a single-byte encoding here. The way the sentence reads to me is that 'ascii' and 'utf8' are common cases and I do not need to worry about them, which is not true for multi-byte utf8 characters. If we're going to name some example encodings, you might replace 'utf8' with 'latin1' instead.
doc/api/stream.md
Outdated
There was a problem hiding this comment.
I think it might be better to be more specific about what 'special' means, which is 'multi-byte'.
Also, the length of the string has no bearing on this particular problem. You could have a single character that spans 4 bytes for utf8 for example.
52246a0 to
d0094d9
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM with the comment addressed.
doc/api/stream.md
Outdated
There was a problem hiding this comment.
The last sentence does not seem to be complete. I guess there is a with missing after "working". I would also add a could after "that" as not every string would likely be an issue.
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue nodejs#6798 that after calling .setEncoding() on the stream, it will thereafter begin to measure the buffer's length in characters.
|
Landed in 89f2074 @jessicaquynh thanks a lot for your contribution |
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: nodejs#13442 Refs: nodejs#6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit documents and edge-case behavior in readable streams. It is expected that non-object streams are measured in bytes against the highWaterMark. However, it was discovered in issue thereafter begin to measure the buffer's length in characters. PR-URL: #13442 Refs: #6798 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Checklist
Ref: #6798
This is documentation PR to denote the change of measurement against the highWaterMark in non-object streams after
.setEncoding()is called. It changes from bytes to character.Affected core subsystem(s)
doc