About
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:
Articles Related
Tools
jEdit
You can found them in Jedit in Utilities > Buffer Options.
Notepad++
dos2unix
The dos2unix command line can transform the end of line: http://dos2unix.sourceforge.net/
Encoding
Java
String lineFeed = "\n";
lineFeed.equals(String.valueOf((char) 10))