Skip to content

Commit ef8d0fc

Browse files
jasnellrvagg
authored andcommitted
doc: list encodings supported by buffer.transcode
Fixes: #15632 PR-URL: #22263 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 1b41cd4 commit ef8d0fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/buffer.md

+3
Original file line numberDiff line numberDiff line change
@@ -2508,6 +2508,9 @@ encoding to another. Returns a new `Buffer` instance.
25082508
Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
25092509
conversion from `fromEnc` to `toEnc` is not permitted.
25102510

2511+
Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,
2512+
`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
2513+
25112514
The transcoding process will use substitution characters if a given byte
25122515
sequence cannot be adequately represented in the target encoding. For instance:
25132516

0 commit comments

Comments
 (0)