From 3bf358da48b4700a41fcba816506ab975ebe2c72 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 8311504c883d21..d9a48eebbcb961 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()`