I created a bug report below stating that the string library is bugged for UTF-8:
As we know, Roblox takes AGES to fix a bug, so I’ll have to create my own functions to replace string.sub and string.find, even if it compromises performance.
But I don’t know how to detect if a byte/character is UTF-8 or not.
local a = '1à3ç5'
for first, last in utf8.graphemes(a) do
local grapheme = string.sub(a, first, last)
print(first, last, '=', grapheme, first ~= last and 'UTF-8' or '')
end