mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user