From 91b3c9d0f312e970120624337b4c6643c055c0b5 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sat, 21 Oct 2017 23:13:09 +0300 Subject: [PATCH] doc: replace undocumented encoding aliases PR-URL: https://github.com/nodejs/node/pull/16368 Reviewed-By: Joyee Cheung Reviewed-By: Luigi Pinca Reviewed-By: Bryan English --- doc/api/errors.md | 2 +- doc/api/fs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 5aa39baadd..5b8fb7875a 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1224,7 +1224,7 @@ Example const Socket = require('net').Socket; const instance = new Socket(); -instance.setEncoding('utf-8'); +instance.setEncoding('utf8'); ``` diff --git a/doc/api/fs.md b/doc/api/fs.md index 6e64319058..ccb2b35a2e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1284,7 +1284,7 @@ If the file previously was shorter than `len` bytes, it is extended, and the extended part is filled with null bytes ('\0'). For example, ```js -console.log(fs.readFileSync('temp.txt', 'utf-8')); +console.log(fs.readFileSync('temp.txt', 'utf8')); // Prints: Node.js // get the file descriptor of the file to be truncated