lua-users home
lua-l archive

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


Philippe Lhoste <PhiLho@GMX.net> wrote:

> > 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... :-)

The issue with text mode is then that '\n' means both
*whatever-line-separator-used-on-current-OS
* character #10

(the same in other scripting languages, indeed)

Denis