lua-users home
lua-l archive

Re: io:lines() and 0円

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



On Feb 20, 2014, at 23:03 , Sean Conner wrote:

It was thus said that the Great René Rebe once stated:

The next time you parse a text file which accidental has a 0円 somewhere
you probably want this bug fix, too ;-) Especially after you spend hours
to figure out what is going on, …

You would have had the same trouble with C if you used fgets().

I have no trouble using fgets, but then if I would not use Lua I would actually use C++, ...

And could you tell me what tool created a text file with embedded NULs in
it? I want to avoid using said tool ...

As mentioned I hit this while implementing a CGI upload, so parsing MIME data.



AltStyle によって変換されたページ (->オリジナル) /