https://bugzilla.wikimedia.org/show_bug.cgi?id=46294

--- Comment #4 from Tim Starling <[email protected]> ---
(In reply to comment #3)
> I'm going to guess that Lua is automatically converting all "\n" to "\r\n"
> when writing to pipe.read (stream.input) on Windows machines. If so, I think 
> the only "true" fix is to somehow override Lua's default newline behavior on
> Windows machines. If that's not possible, then the working fix is probably
> the best alternative.

Lua just uses fwrite() on stdout, i.e. the FILE* supplied by the C library
called stdout. I don't think there is any way to change what mode it is in, and
reopening it would be fairly complex. Note that "\r\n" might also be converted
to \n by io.stdin:read() on the Lua side.

Choosing a serialization format that does not use line endings would be one way
around it. Converting line endings as appropriate if a Windows Lua binary is
detected would be another.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to