[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: manipulating buffers in Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 28 Oct 1998 14:09:39 -0100
> 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