★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/ef8d0fc490Nouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files

doc: list encodings supported by buffer.transcode

Fixes: #15632

PR-URL: #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>
  • Loading branch information...
jasnell authored and rvagg committed Aug 11, 2018
1 parent 1b41cd4 commit ef8d0fc4904d9951412eeb4e9728af68a42f9a89
Showing with 3 additions and 0 deletions.
  1. +3 −0 doc/api/buffer.md
@@ -2508,6 +2508,9 @@ encoding to another. Returns a new `Buffer` instance.
Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
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
sequence cannot be adequately represented in the target encoding. For instance:

0 comments on commit ef8d0fc

Please sign in to comment.
You can’t perform that action at this time.