Characters - Newline - End of Line (EOL) - Line Separators - Line Break


Text - Non-printing Character (Tabulation, New Line, )

To mark line endings in text files, the following characters are used:

  • Unix/Linux file systems use newlines (\n).
  • MacOS uses carriage-returns (\r).
  • Windows uses a carriage-return followed by a newline (\r\n).

Then a line can be considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed. Supporting all possible line terminators allows programs to read text files created on any of the widely used operating systems.

The line separator used by the in-memory representation of file contents is always the newline character. When a file is being loaded, the line separator used in the file on disk is stored in a per-buffer property, and all line-endings are converted to newline characters for the in-memory representation. When the buffer is consequently saved, the value of the property replaces newline characters when the buffer is saved to disk.

Also known as Line break sequences

This characters are:



You can found them in Jedit in Utilities > Buffer Options.



The dos2unix command line can transform the end of line:


Platform Line Ending Xml Unicode Oracle Database Java Description
Apple Macintosh [CR] (#x000D) chr(13) \r Carriage Return
UNIX Based Systems [LF] (#x000A) chr(10) \n line-feed
DOS Based Systems [CR][LF] (#x000D)(#x000A) \r\n carriage-return/line-feed
OS/390 [NEL] (#x0085) NEL


String lineFeed = "\n";
lineFeed.equals(String.valueOf((char) 10))

Documentation / Reference

Powered by ComboStrap