In computing, a newline, also known as a line ending, end of line (EOL), or line break, is a special character or sequence of characters signifying the end of a line of text. The actual codes representing a newline vary across operating systems, which can be a problem when exchanging text files between systems with different newline representations.

The ASCII standard for text does not define a unique end-of-line (EOL) character. Instead, ASCII defines two independent and orthogonal movements of the print head: Carriage Return (CR) and Line Feed (LF).

Name ASCII Code Meaning
Carriage Return (CR) 0x0D moves the print head back to the beginning of the line
Line Feed (LF) 0x0A moves the print head down to the next line

EOL delimiters in different operating systems:

OS or RFC etc EOL delimiter
RFC standard CR LF (0x0D 0x0A)
Windows & MS-DOS CR LF (0x0D 0x0A)
Unix-like system LF (0x0A)
Mac OS X LF (0x0A)
Mac OS (up to 9) CR (0x0D)


See Also

Last modified 3 years ago Last modified on May 22, 2015, 1:35:56 PM