Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I found that luautf8 in some cases treats some invalid sequences as correct utf8.
for i=128,255 do local c = string.char(i) if utf8.len(c) then print(i) end end
But luautf8 considers all such strings as valid.
Even more: luautf8 treats some invalid chars as punctuation:
for i=128,255 do local c = string.char(i) print( i, utf8.match(c,'%p'), string.match(c,'%p') ) end