[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: On Windows why not ignore CRLF?
From: |
thutt |
Subject: |
Re: Q: On Windows why not ignore CRLF? |
Date: |
Fri, 2 Jun 2017 06:24:54 -0700 |
Edward Welbourne writes:
> The remaining question is whether it's *possible* for a text-mode
> file handle on MS to still have a '\r' just before its '\n' in a
> line, presumably due to a CRCRLF mess in the raw file.
Yes, it most certainly is possible. Translation only occurs on
'\r\n'.
Hello\r\r\n.
Will end up as:
Hello\r\n
after being read. The translation doesn't back up and reprocess:.
Hello\r\n
into
Hello\n
The '\n' conversion to '\r\n' on output is transparent, and putting
'\r\n' in the output stream will end up with '\r\r\n' in the file.
--
What books will be in the Trump Presidential Library?