Skip to content

Commit b1bda16

Browse files
TrottMylesBorins
authored andcommitted
doc: edit maxBuffer/Unicode paragraph for clarity
Remove unneeded words from child_process doc. PR-URL: #11228 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 1150af0 commit b1bda16

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

doc/api/child_process.md

+5-10
Original file line numberDiff line numberDiff line change
@@ -1147,16 +1147,11 @@ to the same value.
11471147

11481148
## `maxBuffer` and Unicode
11491149

1150-
It is important to keep in mind that the `maxBuffer` option specifies the
1151-
largest number of *octets* allowed on `stdout` or `stderr`. If this value is
1152-
exceeded, then the child process is terminated. This particularly impacts
1153-
output that includes multibyte character encodings such as UTF-8 or UTF-16.
1154-
For instance, the following will output 13 UTF-8 encoded octets to `stdout`
1155-
although there are only 4 characters:
1156-
1157-
```js
1158-
console.log('中文测试');
1159-
```
1150+
The `maxBuffer` option specifies the largest number of bytes allowed on `stdout`
1151+
or `stderr`. If this value is exceeded, then the child process is terminated.
1152+
This impacts output that includes multibyte character encodings such as UTF-8 or
1153+
UTF-16. For instance, `console.log('中文测试')` will send 13 UTF-8 encoded bytes
1154+
to `stdout` although there are only 4 characters.
11601155

11611156
[`'error'`]: #child_process_event_error
11621157
[`'exit'`]: #child_process_event_exit

0 commit comments

Comments
 (0)