Skip to content

Commit e585f95

Browse files
committed
doc: list encodings supported by buffer.transcode
Fixes: nodejs#15632
1 parent dcfd323 commit e585f95

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()` include: `'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)