[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua for unicode
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 02 Dec 2002 14:09:37 +0000
> The null character ('\0' in C) is represented in Unicode as a single, zero
> byte. Will Lua handle this case correctly, since I think it permits strings
> with '\0' in them?
Lua only uses those functions (from string.h) to manipulate some
restricted sets of strings (such as reserved words or identifiers),
which for sure do not contain zeros, or strings that can be truncated
to their first zero (such as when formatting error messages). (In one
single place, it also uses `strlen' to find any eventual '\0' inside the
string.)
-- Roberto