[OT] Modern-day Mac EOLs?

Michel Fortin michel.fortin at michelf.com
Mon Sep 7 17:01:53 PDT 2009


On 2009-09-07 17:08:58 -0400, "Nick Sabalausky" <a at a.a> said:

> For our resident Mac users:
> 
> I know (or at least have heard) that Mac's EOLs are traditionally '\r'. But,
> mac directory separators are traditionally ':' and I know that these days
> macs can, and often do, use '/' just fine instead. So...are '\r' line
> endings still in use and worth supporting, or have they pretty much
> disappeared in favor of '\n'? (I'm mainly wondering for code, but also
> curious about other text too).

You can still sometime encounter those from some Carbon-based 
applications ported from Mac OS 9 (both the newlines and the colon as a 
directory separator). Gecko on a Mac used to use \r when copy-pasting 
text from a webpage not so long ago. But generally-speaking, it's on 
the way out.

Whether it's "worth supporting" and to what degree probably depends on 
what you do. I'd say it's still generally worth supporting \r so you 
can open old text files from a Mac (inlcuding source code). It also 
need to be supported in HTML and XML files (per specification) and a 
few other places.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list