On Feb 17, 2014, at 16:55 , steve donovan wrote:
On Mon, Feb 17, 2014 at 5:51 PM, René Rebe <
rene@exactcode.de> wrote:
I just noticed that io:lines() does not cope with 0円 in the lines, and thus
just returns truncated lines (lua-5.2.3, but legacy 5.1 likewise).
This is not surprising. The whole idea of 'lines' only really applies
to text files, at least in my head ;)
well, in my option library foundations should just work, and not silently discard some bits and bytes. A line is a line, no matter how many 0円 are in there until the next \n-newline. And the Lua manual points out Lua strings are 0円-save.
I already provided patches a year or two ago for other pattern matching 0円 fixes, which where merged into 5.2.
One quite simple and obvious use of lines with 0円 binary data is parsing MIME, CGI data.
René