doc: list encodings supported by buffer.transcode
Fixes: https://github.com/nodejs/node/issues/15632 PR-URL: https://github.com/nodejs/node/pull/22263 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
58cf40987f
commit
a5b3c15b77
@ -2508,6 +2508,9 @@ encoding to another. Returns a new `Buffer` instance.
|
|||||||
Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
|
Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
|
||||||
conversion from `fromEnc` to `toEnc` is not permitted.
|
conversion from `fromEnc` to `toEnc` is not permitted.
|
||||||
|
|
||||||
|
Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,
|
||||||
|
`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
|
||||||
|
|
||||||
The transcoding process will use substitution characters if a given byte
|
The transcoding process will use substitution characters if a given byte
|
||||||
sequence cannot be adequately represented in the target encoding. For instance:
|
sequence cannot be adequately represented in the target encoding. For instance:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user