Commit graph

3 commits

Author SHA1 Message Date
hryx
52d06037d1 Added utf8.encode
Here's a function that takes a Unicode code point and returns the corresponding UTF-8 encoded character bytes. Example:

    utf8.encode(0x265c) -- returns '♜'

Please feel free to edit or revert if it's not your style. It might not be relevant to Quickie, though it's a handy UTF-8 utility.
2013-12-31 04:37:04 -08:00
Matthias Richter
b63895a2c7 [utf8.la] Add license, documentation. 2013-12-11 15:55:28 +01:00
Matthias Richter
66a089a07f Fix bug in input.lua, make 0.9-ready, add utf8 editing
1) [input.lua] Pressing backspace while the cursor was at the beggining
   of the text removed the first character. Fixed thanks to riidom.
2) [LÖVE 0.9] Use setLine(Width|Style) instead of setLine. Split
   keyboard.pressed() into keyboard.pressed() and keyboard.textinput().
   (see readme)
3) [utf8.lua] Add support for UTF-8 text editing. May still fail
   spectacurlarly with invalid UTF-8 strings.
2013-12-11 15:25:06 +01:00