"Walter Bright" <[email protected]> wrote in message news:[email protected]... > On 5/21/2011 9:09 AM, Robert Clipsham wrote: >> Also, doesn't your editor leave line endings in tact? Every editor I've >> used for >> programming detects the line endings and doesn't play with them, and they >> generally have an option to chose the default line ending style for new >> files. > > My editor sets the line endings to match the default of the OS it is > running under. In my experience, it is nearly always the right thing to > do. >
I'm becoming convinced that just using Unix-style \n even on Windows is nearly always the right thing to do. Windows Notepad is the only Windows program I've come across that still has any problem with Unix-style line endings. And what programmer ever uses that? Everything else handles \n just fine these days, even on Windows. (With the possible exception of Batch files - I haven't tried that...) > There isn't a right or wrong answer here, unfortunately. Unfortunately, > even now a lot of unix programs still crash and burn with CRLF files (I'm > looking at you, make on FreeBSD). >
