mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix JSON parser on some rare utf8 representations
This patch is provided by @hchaojie and should fix #252.
This commit is contained in:
@@ -326,6 +326,8 @@ local function grok_string(self, text, start, etc)
|
||||
elseif text:match('^\\t', i) then
|
||||
VALUE = VALUE .. "\t"
|
||||
i = i + 2
|
||||
elseif text:match('^\\\\', i) then
|
||||
i = i + 1
|
||||
else
|
||||
local hex = text:match('^\\u([0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF][0123456789aAbBcCdDeEfF])', i)
|
||||
if hex then
|
||||
|
||||
Reference in New Issue
Block a user