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:
parent
e07e708102
commit
93d113510d
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user