From 4af68f5b34e5e78271c7e24fcd1ecbca3690b69d Mon Sep 17 00:00:00 2001 From: Jesse Tane Date: Mon, 10 Aug 2015 23:36:15 -0400 Subject: [PATCH] unicode top should be 0x10FFFF --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- 2.34.1