lua-users home
lua-l archive

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


How can this be with system string calls like strlen and strncpy
and strcpy in the lua source?  If the strlen or stcpy are the
ascii type, this will not work on strings with null bytes.

Regards,
Jim


-----Original Message-----
From: Roberto Ierusalimschy [mailto:roberto@inf.puc-rio.br]
Sent: Wednesday, May 31, 2000 6:52 AM
To: Multiple recipients of list
Subject: Re: Unicode and CE? 


> this is assuming the lua strlib also works with binary
> strings?  can anyone confirm this?

All strings in Lua are "binary", meaning that they can be any sequence
of binary values (including zeros). The only places that do not
accept strings with embedding zeros are patterns (although the subject
string and eventual results may contain zeros; in the pattern itself you
can use a "%z" to match a zero), and the function "format".

-- Roberto