lua-users home
lua-l archive

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

On 19/11/2009 05:52, Roger Ivie wrote:
Yes. When you open in text mode, "\n" is written as CRLF instead of LF.
That's what text mode means.

In text mode, when you write "\r\n", it is written as CRCRLF. The first
CR is for the "\r" and the CRLF is for the "\n".

Aha, good answer! Obvious in retrospect... It explains why sometime I get files with double line spacing with this curious CRCRLF scheme. And why one should use the system-agnostic \n line ending: even if that's what is written raw in the file, only the brain-dead Notepad won't understand it... :-)

Philippe Lhoste
--  (near) Paris -- France
--  --  --  --  --  --  --  --  --  --  --  --  --  --