[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stdin in binary mode under Windows - how?
- From: mascarenhas@...
- Date: Tue, 9 Sep 2008 13:47:42 -0300
There's an lfs.setmode function in Kepler's LuaFileSystem which is
used by the WSAPI launchers. A caveat is that LuaFileSystem has to use
the same C runtime as the Lua DLL for it to work.
On 9/9/08, Dr. Markus Walther <firstname.lastname@example.org> wrote:
> Hi all,
> I am using a Lua 5.1. CGI script to handle HTTP POST-based file uploads
> under Windows/Apache. The script reads blocks of data from stdin until
> EOF, and strips multipart boundaries.
> Since stdin is set to text mode, I am losing all carriage returns that
> were present in the original file before upload.
> Question: Is there an easy way to change stdin to binary mode under Windows?
> PS: I briefly studied Kepler sources and _if_ I didn't overlook
> something, there is no provision against this problem as well.