Browse Source

doc: edit maxBuffer/Unicode paragraph for clarity

Remove unneeded words from child_process doc.

PR-URL: https://github.com/nodejs/node/pull/11228
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v7.x
Rich Trott 8 years ago
committed by Italo A. Casas
parent
commit
5d2ba44fca
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 15
      doc/api/child_process.md

15
doc/api/child_process.md

@ -1157,16 +1157,11 @@ to the same value.
## `maxBuffer` and Unicode ## `maxBuffer` and Unicode
It is important to keep in mind that the `maxBuffer` option specifies the The `maxBuffer` option specifies the largest number of bytes allowed on `stdout`
largest number of *octets* allowed on `stdout` or `stderr`. If this value is or `stderr`. If this value is exceeded, then the child process is terminated.
exceeded, then the child process is terminated. This particularly impacts This impacts output that includes multibyte character encodings such as UTF-8 or
output that includes multibyte character encodings such as UTF-8 or UTF-16. UTF-16. For instance, `console.log('中文测试')` will send 13 UTF-8 encoded bytes
For instance, the following will output 13 UTF-8 encoded octets to `stdout` to `stdout` although there are only 4 characters.
although there are only 4 characters:
```js
console.log('中文测试');
```
[`'error'`]: #child_process_event_error [`'error'`]: #child_process_event_error
[`'exit'`]: #child_process_event_exit [`'exit'`]: #child_process_event_exit

Loading…
Cancel
Save