d954mas
December 31, 2019, 8:35am
1
I need a utf8 lib, so i build GitHub - starwing/luautf8: a utf-8 support module for Lua and LuaJIT. · GitHub as defold natve exstention.
library:GitHub - d954mas/defold-utf8: utf8 library bindings for defold · GitHub
I use it in html and windows. But it should work everywhere.
Examples
More info read in luautf8.
Many routines are same as Lua’s string module:
utf8.byte
utf8.char
utf8.find
utf8.gmatch
utf8.gsub
utf8.len
utf8.lower
utf8.match
utf8.reverse
utf8.sub
utf8.upper
20 Likes
That’s a nice addition. Don’t forget to submit it to the Asset Portal !
4 Likes
Pawel
January 19, 2024, 3:00pm
3
Funny thing is that I came back to this, when I wanted to test Tabular - a nice Lua module to pretty print my tables
https://github.com/hishamhm/tabular
After fetching utf8 it works flawlessly (You need also to comment out ansicolors dependencies out of it (like, 3 lines)) and it works in Defold console:
(print is pretty, but content is not
)
EDIT, ok here’s example taken from their readme:
3 Likes