mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
doc: fix encoding string in buffer example
PR-URL: https://github.com/nodejs/node/pull/12482 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
7cd0d4f644
commit
3bf358da48
@ -42,7 +42,7 @@ const buf4 = Buffer.from([1, 2, 3]);
|
||||
const buf5 = Buffer.from('tést');
|
||||
|
||||
// Creates a Buffer containing Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
||||
const buf6 = Buffer.from('tést', 'latin-1');
|
||||
const buf6 = Buffer.from('tést', 'latin1');
|
||||
```
|
||||
|
||||
## `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()`
|
||||
|
Loading…
Reference in New Issue
Block a user