mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 09:13:53 +01:00
Fix text.utf8 edge case
This commit is contained in:
parent
9fee80061e
commit
6cc39ef023
2
text.lua
2
text.lua
@ -131,7 +131,7 @@ magic_charset = "[" .. table.concat(magic_charset) .. "]"
|
|||||||
function escape_magic_chars(text) return text:gsub("(" .. magic_charset .. ")", "%%%1") end
|
function escape_magic_chars(text) return text:gsub("(" .. magic_charset .. ")", "%%%1") end
|
||||||
|
|
||||||
function utf8(number)
|
function utf8(number)
|
||||||
if number < 0x007F then
|
if number <= 0x007F then
|
||||||
-- Single byte
|
-- Single byte
|
||||||
return string.char(number)
|
return string.char(number)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user