[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io:lines() and \0
- From: Rene Rebe <rene@...>
- Date: Fri, 21 Feb 2014 19:58:43 +0400
>> On 21.02.2014, at 19:23, Javier Guerra Giraldez <javier@guerrag.com> wrote:
>>
>> On Fri, Feb 21, 2014 at 10:14 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>> For me, only text files have lines
>
>
> i concur.
>
> i would even accept if io.lines() raised an error if called with a
> file that wasn't opened in text mode.
>
> of course, i much prefer the contract to be clearly stated "due to the
> underlying old C implementation, embedded control characters can make
> it return wrong results. if you need to read binary data, use
> file:read()"
Which is again simply not true, the underlying old c implementation reads it just fine.
And oh the irony: first advertising strings with zeros support in the language and then making it unnecessarily harder to actually read them without any technical reason.
> --
> Javier
Sent on the go - http://ExactCODE.com Germany.
- References:
- Re: io:lines() and \0, René Rebe
- Re: io:lines() and \0, René Rebe
- Re: io:lines() and \0, Sean Conner
- Re: io:lines() and \0, Francisco Olarte
- Re: io:lines() and \0, Enrico Colombini
- Re: io:lines() and \0, Francisco Olarte
- Re: io:lines() and \0, Sean Conner
- Re: io:lines() and \0, Francisco Olarte
- Re: io:lines() and \0, Sean Conner
- Re: io:lines() and \0, Francisco Olarte
- Re: io:lines() and \0, Roberto Ierusalimschy
- Re: io:lines() and \0, René Rebe
- Re: io:lines() and \0, steve donovan
- Re: io:lines() and \0, René Rebe
- Re: io:lines() and \0, Andrew Starks
- Re: io:lines() and \0, Dirk Laurie
- Re: io:lines() and \0, Javier Guerra Giraldez