lua-users home
lua-l archive

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


> I need to read binary files and then read, manipulate and save parts of it.
> I can do this with strings? Currently, when I write a string to a file
> using Lua the resulting file is ASCII, not binary.

Are you using DOS/Windows? In these systems, files must be opened in "binary"
mode to work properly with binary data. Currently, readfrom and writeto
open a file without worries about that; it works fine in Unix, but in DOS
it defaults to text. We will correct this in Lua 3.2.

-- Roberto