lua-parser icon indicating copy to clipboard operation
lua-parser copied to clipboard

Polyfill utf8.char

Open Validark opened this issue 3 years ago • 1 comments

Validark avatar Jul 08 '22 12:07 Validark

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

Validark avatar Jul 13 '22 22:07 Validark