lua-users home
lua-l archive

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


On 09/06/2017 06:33 AM, Dirk Laurie wrote:
> A Windows text file read on Linux usually has \r at the end which
> is not removed by those two routines.

A Windows (DOS) format text file uses '\r\n' instead of plain '\n' for
line breaks. An empty text file is still empty (0 bytes) on Windows, and
a single line (no break) does not have any '\r' char appended.

Scott