From d0ba631efa11a468e9740cde5d2f360420ce6e35 Mon Sep 17 00:00:00 2001 From: MapleUncle Date: Tue, 18 Apr 2017 13:29:07 +0800 Subject: [PATCH] doc: fix encoding string in buffer example PR-URL: https://github.com/nodejs/node/pull/12482 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Timothy Gu Reviewed-By: Colin Ihrig --- doc/api/buffer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 7ca33c0b8f14a7..44991d2673e978 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -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()`