lua-parser
lua-parser copied to clipboard
Polyfill utf8.char
It's pretty easy to verify this is the correct implementation btw. Just run this for all possible inputs in Lua 5.4 (and make it so utf8_char is always the custom version):
for i = 0, 1114111 do
assert(utf8_char(i) == utf8.char(i))
end