Skip to content

Commit 5d2ba44

Browse files
Trottitaloacasas
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 9339891 commit 5d2ba44

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
@@ -1157,16 +1157,11 @@ to the same value.
11571157

11581158
## `maxBuffer` and Unicode
11591159

1160-
It is important to keep in mind that the `maxBuffer` option specifies the
1161-
largest number of *octets* allowed on `stdout` or `stderr`. If this value is
1162-
exceeded, then the child process is terminated. This particularly impacts
1163-
output that includes multibyte character encodings such as UTF-8 or UTF-16.
1164-
For instance, the following will output 13 UTF-8 encoded octets to `stdout`
1165-
although there are only 4 characters:
1166-
1167-
```js
1168-
console.log('中文测试');
1169-
```
1160+
The `maxBuffer` option specifies the largest number of bytes allowed on `stdout`
1161+
or `stderr`. If this value is exceeded, then the child process is terminated.
1162+
This impacts output that includes multibyte character encodings such as UTF-8 or
1163+
UTF-16. For instance, `console.log('中文测试')` will send 13 UTF-8 encoded bytes
1164+
to `stdout` although there are only 4 characters.
11701165

11711166
[`'error'`]: #child_process_event_error
11721167
[`'exit'`]: #child_process_event_exit

0 commit comments

Comments
 (0)