lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Feb 19, 2014, at 14:59 , steve donovan wrote:

On Wed, Feb 19, 2014 at 3:47 PM, Enrico Colombini <erix@erix.it> wrote:
As has been noted, text functions (regardless of what their behaviour on
observed systems may be) only guarantee that printable characters, leading
spaces and the few control characters listed by the standard are preserved:
the printable information.


+1.  I would not expect any other interpretation, and we understand
that Lua is built on standard C and its limitations.  Otherwise it
will grow its own libc and then it will no longer be the little beast
we know and love.

I do not really understand how there can be so much argument for something
as simple as this. This bug only exists because this old-fashioned C function
does not return how much data was read. If this C function would return a
pointer to the end of the data (like the new getline(3)) we would not even have
an discussion now. Amazing how much energy goes into preventing other
people to improve something; fix an issue.

Actually the C function behaves properly, just that Lua makes no attempt to
determine how much was actually read. And instead of just fixing this bug we
end up arguing -Steve Jobs like- that I am holding the binary text file wrong.

And again, most system including Linux and Mac ignore this text mode
nonsense to start with and simply tread all files as binary files no matter
how long you want to call some files text tiles.

-- 
 ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | http://t2-project.org | http://rene.rebe.de