[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug in luac.exe on win32, lua 5.1.4
- From: David Manura <dm.lua@...>
- Date: Wed, 22 Sep 2010 16:50:17 -0400
On Wed, Sep 22, 2010 at 2:32 PM, Fabien <email@example.com> wrote:
> Unfortunately, Windows considers stdout as an ASCII output, and therefore
> translates all occurrences of "0x0a" into "0x0d, 0x0a", thus corrupting the
> produced bytecode.
> This can be checked by performing a binary diff between 1.luac and 2.luac,
> produced by "luac -o 1.luac whatever.lua" and "luac -o - whatever.lua >
Similarly for stdin, "lua - <1.luac" fails even though "lua 1.luac" works.
Also, should io.stdout and io.stdin open in ASCII or binary mode?
Binary is more useful, and ASCII files can be processed most generally
in binary mode. To implement something like netpbm image filters, you
will need binary stdin/stdout.