|
Or, since it sounds like you're trying to pipe it to a unix util on windows (mingw? cygwin?), you could insert sed or maybe something like tr into the pipeline right after Lua?--On Mon, May 18, 2015 at 3:25 PM, Brigham Toskin <brighamtoskin@gmail.com> wrote:If you're in LuaJIT you can maybe use FFI (or similar C function/system call extension under Lua).--On Sun, May 17, 2015 at 9:20 PM, 张睿 <zrui16@hotmail.com> wrote:It's CRT (not lua) that does the translation.
In C, one can call _setmode( _fileno( stdout ), _O_BINARY ) to set output to binary mode.
I don't see how it can be done directly in lua.
-----Original Message-----
From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On Behalf Of tonyp@acm.org
Sent: Monday, May 18, 2015 3:48 AM
To: Lua mailing list
Subject: Re: Is it possible to output LF without CR under Windows? Lua 5.3
No file. I'm interested in stdout as I want to pipe it to another command.
Can I re-open stdout in binary mode?
-----Original Message-----
From: Pierre Chapuis
Sent: Sunday, May 17, 2015 10:44 PM
To: Lua mailing list
Subject: Re: Is it possible to output LF without CR under Windows? Lua 5.3
> Any ideas how to output LFs only under Windows?
Open the file in binary mode.
Brigham ToskinBrigham Toskin