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

Data System Architecture

About

Non Printing

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:

Tools

jEdit

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

Newline

Notepad++

Notepad End Of Line

dos2unix

The dos2unix command line can transform the end of line: http://dos2unix.sourceforge.net/

Encoding

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

Java

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

Documentation / Reference





Discover More
Notepad Eol
Examples on how to replace a text in Notepad++ with regular expression

A step by step tutorial and snippets on how to replace a portion of text in notepad++ with regular expression
Regexp
Regular Expression - Line (Beginning and End)

Page the definition of line boundary (EOL) in regular expression You can define the begining or the end of a line with boundary matcher boundary matcher Description ^ The beginning of a line...
Card Puncher Data Processing
Shell Data Processing - Sed (Stream editor)

sed stands for stream editor. It is a filter program used for filtering and transforming text It: takes as input a standard stream input modifies it based on one or more command, and returns...



Share this page:
Follow us:
Task Runner