diff --git a/doc/api/errors.md b/doc/api/errors.md index 5aa39baadd0674..5b8fb7875a7e4b 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 6e643190584011..ccb2b35a2e967c 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