[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: strange question about the io.write
- From: bidong liao <liaoliaopro@...>
- Date: Thu, 19 Nov 2009 18:03:33 +0800
but why? different platforms got different results(mac got CRLF but windows got CRCRLF)?
On Thu, Nov 19, 2009 at 5:38 PM, Philippe Lhoste <PhiLho@gmx.net>
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... :-)
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".
-- (near) Paris -- France
-- -- -- -- -- -- -- -- -- -- -- -- -- --