lua-users home
lua-l archive

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

Ico wrote:
I'm trying to use io.lines() to read lines from a file which contains \0
characters. This seems to fail, probably because of the fgets() used in

Because - unlike C strings/char arrays - Lua strings are 8-bit safe, the
expected behaviour for me was for io.lines() to simply handle the \0's
as regular characters.

This behavior can be easily achieved, see