doc: replace undocumented encoding aliases

PR-URL: https://github.com/nodejs/node/pull/16368
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
This commit is contained in:
Vse Mozhet Byt 2017-10-21 23:13:09 +03:00
parent e07e708102
commit 93d113510d
2 changed files with 2 additions and 2 deletions

View File

@ -1224,7 +1224,7 @@ Example
const Socket = require('net').Socket;
const instance = new Socket();
instance.setEncoding('utf-8');
instance.setEncoding('utf8');
```
<a id="ERR_TLS_CERT_ALTNAME_INVALID"></a>

View File

@ -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