lua-users home
lua-l archive

[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.

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