diff options
author | James M Snell <jasnell@gmail.com> | 2018-08-10 22:04:47 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-11 17:08:15 -0700 |
commit | a5b3c15b77d1bf4b12e1e277c7814a12c2101c61 (patch) | |
tree | aa5c49bf1a120c41395b89f9224d6fd661df8dc7 /doc/api/buffer.md | |
parent | 58cf40987f6e08038c74c053da85b62956fe4469 (diff) | |
download | android-node-v8-a5b3c15b77d1bf4b12e1e277c7814a12c2101c61.tar.gz android-node-v8-a5b3c15b77d1bf4b12e1e277c7814a12c2101c61.tar.bz2 android-node-v8-a5b3c15b77d1bf4b12e1e277c7814a12c2101c61.zip |
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>
Diffstat (limited to 'doc/api/buffer.md')
-rw-r--r-- | doc/api/buffer.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 8e1d1c325b..d483fe4033 100644 --- a/doc/api/buffer.md +++ b/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: |