Strange output with multi width emojis
yangm97 opened this issue ยท 0 comments
yangm97 commented
Using LUA 5.1 on macOS
local utf8 = require 'utf8'
local t = {}
local str = "text ๐
๐จโ๐ป ๐ง๐ท ๐ณ๏ธโ๐"
for i=1, utf8.len(str) do
t[i]= (utf8.sub(str,i,i))
end
for k , v in pairs(t) do
print(k,v)
end
Output:
1 t
2 e
3 x
4 t
5
6 ๐
7
8 ๐จ
9 โ
10 ๐ป
11
12 ๐ง
13 ๐ท
14
15 ๐ณ
16 ๏ธ
17 โ
18 ๐