Skip to content

Commit 93d1135

Browse files
committed
doc: replace undocumented encoding aliases
PR-URL: #16368 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Bryan English <bryan@bryanenglish.com>
1 parent e07e708 commit 93d1135

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎doc/api/errors.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ Example
12241224
const Socket = require('net').Socket;
12251225
const instance = new Socket();
12261226

1227-
instance.setEncoding('utf-8');
1227+
instance.setEncoding('utf8');
12281228
```
12291229

12301230
<a id="ERR_TLS_CERT_ALTNAME_INVALID"></a>

‎doc/api/fs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ If the file previously was shorter than `len` bytes, it is extended, and the
12841284
extended part is filled with null bytes ('\0'). For example,
12851285

12861286
```js
1287-
console.log(fs.readFileSync('temp.txt', 'utf-8'));
1287+
console.log(fs.readFileSync('temp.txt', 'utf8'));
12881288
// Prints: Node.js
12891289

12901290
// get the file descriptor of the file to be truncated

0 commit comments

Comments
 (0)