lua-users home
lua-l archive

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


On Sun, May 25, 2008 at 3:15 AM, Petite Abeille
<petite.abeille@gmail.com> wrote:
> Sure, a Lua string can store any byte sequence.

right.

Lua doesn't have a problem with Unicode (or any other encoding); but
the 'string' library functions work on bytes, and therefore can be
confused by multi-byte characters.

if you use UTF-8, simply make sure the templates are free of multibyte
characters. the strings you insert into placeholders can be anything
you want.  (at least on the few template systems i've checked, the
'replacement data' isn't manipulated anyhow, so it's safe).

-- 
Javier