A line ending malfeature
from that obnoxious monster DOS
, and aptly referred to as a bug
DOS line terminators are in ASCII hexadecimal represented as 0D 0A, or symbolically as CR LF (carriage return line feed). Every line break is represented by these two characters. This is probably because old line printers required these two characters to terminate a line--one to "return the carriage" (like old typewriters), and one to "feed a line."
This has leached over to the whole Microsoft series of operating systems.
Sane operating systems like UNIX use a single LF (0A) character to end lines. The discrepancy leads to much kludging and portability agony. For instance, in C (the language), "\n" is an escape sequence for newline in strings. This maps to an ASCII LF or 0A--except in DOS it actually has to expand to CR LF. Which is bad because \n also has to serve as a character, and it can break file format compatibility.
Then there are the Macs, with their single CR (0D) line terminators... The moral of the story is you have to jump through many portability hoops to reach beyond the *NIX world.
Note: Many internet RFC standards have consequently declared the DOS-style CR LF as the standard for line terminators, but are required to accept all styles.