lua-users home
lua-l archive

Re: [Manual][Bug?] utf8.char and invalid codepoints

[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.

AltStyle によって変換されたページ (->オリジナル) /