|
|
|
|
|
by ericbarrett
1435 days ago
|
|
This is correct, but they're only "Microsoft" line endings (CR+LF) when you're encoding a text file. When output to a terminal, they're literal instructions: CR - carriage return - escaped as \r - move the carriage to the beginning of the line (the "carriage" is the print head of a line printer, think an old dot-matrix or a typewriter) LF - line feed - escaped as \n - advance the paper one line. Since all on-screen terminals are "virtual", these are translated to cursor movements. But their origin is in paper output. If you've ever
seen text that
gets printed like this
...it's because the \n LF line separators in the output aren't being translated to terminal instructions, just dumped raw.MS decided that both should be kept in text files; Unix-ish dropped the carriage return to use \n; MacOS before OSX used only \r. |
|