The Great Newline Schism

I’ve been burned by the newline problem many times myself; some tools
make it easier than others to deal with it (UltraEdit, my preferred
text editor, shows which mode a file is in and lets you convert
easily; but you can still get confused by a file that has multiple
ending types caused by copy-and-pasting), and if you use FTP to
transfer files you can select “ASCII mode” to convert to the
appropriate conventions of the destination.

Everywhere you look in computing, you find the debris of all the past
archaic hardware and software, platform and standards wars, and so
on, preserved out of desire for compatibility. This can be both
fascinating and maddening. Inquire into just about anything: Why
does Windows use backslashes for directory paths? Why do URLs use
forward slashes? What’s the point of the double slash near the
beginning of URLs? Why do some standards, such as for e-mail,
specify lines of no more than 80 characters? Why is “prn” not a
legal file/pathname in M$ operating systems and application
frameworks? Why do most user agent identifier strings start with
"Mozilla"? Why does Windows 7 have “6.1” as its internal version
number? Why are reverse domain lookups done with a top level domain
named “.arpa”? These things will always lead to long, tangled
stories, sometimes stretching into the dim past of computing up to or
beyond a half century ago. (I think the 80-character limits derived
from 1890s Hollerith punch cards.)

But if that’s what we have after less than a century of the
computerized world, imagine what sorts of historical baggage there’ll
be in the devices of a millennium or more in the future.