Added Lua 5.3's UTF-8 module to LÖVE. Resolves issue #951.

The module must be required before use, i.e. utf8 = require("utf8").  API documentation can be found here: http://www.lua.org/manual/5.3/manual.html#6.5

Removing the last unicode character in a string (for proper backspace support in text boxes, for example) can be done using utf8.offset, e.g. text = text:sub(1, utf8.offset(text, -1) - 1).
This commit is contained in:
Alex Szpakowski
2015-01-21 16:52:56 -04:00
parent b4f2a9417a
commit e82d1dfe54
7 changed files with 392 additions and 2 deletions
+1
View File
@@ -109,6 +109,7 @@
# define LOVE_ENABLE_KEYBOARD_SDL
# define LOVE_ENABLE_LOVE
# define LOVE_ENABLE_LUASOCKET
# define LOVE_ENABLE_LUAUTF8
# define LOVE_ENABLE_MATH
# define LOVE_ENABLE_MOUSE
# define LOVE_ENABLE_MOUSE_SDL