lua-users home
lua-l archive

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


2015-06-29 1:46 GMT+02:00 Soni L. <fakedme@gmail.com>:

> The manual doesn't seem to specify what utf8.char does if it meets an
> invalid codepoint...

You're supposed to vet any untrusted string with utf8.len
before calling anything else from the utf8 library.

The situation is quite similar to using the table library for
something that is not a proper sequence. The manual only
says you shouldn't.