lua-users home
lua-l archive

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

Am 29.01.2016 um 12:09 schröbte Enrico Colombini:
On 29-Jan-16 11:49, Cezary H. Noweta wrote:
OSes no, but still is used --- ECMA Script and derivatives (JavaScript)
for example. However, I agree that \r alone is dangerous (i.e. when
counting lines of redirected output file containing many '\r's: ``[+
]\r[++ ]\r[+++]\n''): besides JavaScript lexers, your \r?\n is quite
fine in general. Old Mac's line endings are not made by accident --- one
must be itching to do '\r' EOLs.

The Apple ][ also used \r... and file types :-)

An aside note: having to often write portable code, I set my
Windows-side editor (notepad++) to use \n only and disabled autocrlf in
git to avoid accidental binary files translation.

This is what I usually do as well, but there are certain files (in particular batch files larger than 4k, I think) that need "\r\n" line endings.