From: Jesse Tane Date: Tue, 11 Aug 2015 03:36:15 +0000 (-0400) Subject: unicode top should be 0x10FFFF X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=4af68f5b34e5e78271c7e24fcd1ecbca3690b69d;p=buffer.git unicode top should be 0x10FFFF --- diff --git a/index.js b/index.js index b9a511b..cdd3092 100644 --- a/index.js +++ b/index.js @@ -1458,7 +1458,7 @@ function utf8ToBytes (string, units) { codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80 ) - } else if (codePoint < 0x200000) { + } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break bytes.push( codePoint >> 0x12 | 0xF0,