From ce8f5eee8ec2253a13a47a9055ae67f407ac2767 Mon Sep 17 00:00:00 2001 From: himself65 Date: Sat, 22 Feb 2020 18:00:28 +0800 Subject: [PATCH] doc: add support encoding link on string_decoder.md PR-URL: https://github.com/nodejs/node/pull/31911 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell --- doc/api/string_decoder.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md index 29defb71747095..54fcc876c9a9e9 100644 --- a/doc/api/string_decoder.md +++ b/doc/api/string_decoder.md @@ -49,7 +49,7 @@ console.log(decoder.end(Buffer.from([0xAC]))); added: v0.1.99 --> -* `encoding` {string} The character encoding the `StringDecoder` will use. +* `encoding` {string} The character [encoding][] the `StringDecoder` will use. **Default:** `'utf8'`. Creates a new `StringDecoder` instance. @@ -88,3 +88,5 @@ Returns a decoded string, ensuring that any incomplete multibyte characters at the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`. + +[encoding]: buffer.html#buffer_buffers_and_character_encodings