Utf8 native extension

I need a utf8 lib, so i build https://github.com/starwing/luautf8 as defold natve exstention.

library:https://github.com/d954mas/defold-utf8
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

Funny thing is that I came back to this, when I wanted to test Tabular - a nice Lua module to pretty print my tables :smiley:

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:

image
(print is pretty, but content is not :sweat_smile:)

EDIT, ok here’s example taken from their readme:

3 Likes