On Feb 17, 2014, at 16:55 , steve donovan wrote:
Thinking about this a bit more - in my opinion this currently is a bug in the
Lua io library for a simple reason:
The returned line does not match what the C library returned. The effect
is that the C library reads more than the Lua wrapper in the io library returns,
and thus silently discards data.
A loop over the lines of any file should reproduce the file, given a reasonable
modern, C library, especially when the file is opened in binary mode.
Yes, this is mostly the fault of poor, decades old C library API - but in my
opinion we should still handle it properly and fix this to match what the C
I will work on a more performance patch, and hope it could potentially be