lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


David Kastrup wrote:
>> Apropos: could someone clue me in what the proposed way of operation
>> is for dealing with utf-8 strings?  When one is using lua as an
>> embedded interpreter, having efficient strings with a natural Unicode
>> character type (internally represented with utf-8) would save a lot of
>>headaches.

Lua is already 8-bit clean when it comes to strings, so they can store UTF-8 with no problem. The issue at hand is input and output, and when you embed Lua into program, you would have to provide your own output method which took into account UTF-8 encoding. I've recently done this myself, and it's not too hard. The Wiki and RFCs associated with UTF-8 provide a lot of information. These links should help.
http://en.wikipedia.org/wiki/UTF-8
http://tools.ietf.org/html/rfc3629

--
William C. Bubel