[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Reading from an empty file
- From: Scott Morgan <blumf@...>
- Date: Wed, 6 Sep 2017 09:13:04 +0100
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.