lua-users home
lua-l archive

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


I found (slightly to my surprise) that io.read under Linux does not
discard the \r character when given files with \r\n line endings.

First issue: is keeping `\r' a bug, an implementation detail, or a feature?

I also found (slightly to my surprise) that io.lines and file.lines have
nothing to do with each other. io.lines does not operate by assigning
a default file if needed and invoking file.lines. Instead, both invoke
an auxiliary function, not exposed at the Lua level.

Second issue: is this an implementation detail, or a feature?