InfoCenter

Line Breaks

On a typewriter, a new line is carried out by two actions. The print position goes to the beginning of the line (Carriage Return) and the print position moves and down to the next line (Line Feed). When systems for character sets were developed, these character sets got control characters for both, the carriage return as well as the line feed. How a new line is actually encoded in a modern text file and which of these control characters are used differs from system to system. An overview, you can see in the next table.

Shortcut Code Hex/Dez System/Usage
CR LF0D 0A / 13 10ASCII Windows, DOS, OS/2, TOS Atari, CP/M
LF 0A / 10ASCII Unix, Linux, Mac OS X, BSD, AmigaOS
CR 0D / 13ASCII Mac OS bis Version 9, Apple II
NEL 15 / 21EBCDIC AIX OS, OS/390
FFU+000CUnicode Form Feed
NELU+0085Unicode New Line
LSU+2028Unicode Line Separator
PS U+2029Unicode Paragraph Separator

As you can see, the Line Feed (LF) has the code 0A in the ASCII character set and the Carriage Return (CR) is encoded with 0D. Windows or DOS are using both characters CR LF as a line break, Unix, Linux or Mac OS X only LF and Mac OS up to version 9 only CR. Behind those characters, the Unicode standard also defines the other code points shown in this table as code points for a new line.

Interchanging Files

The different encodings for line breaks are producing lots of problems when interchanging files between different systems. A file created on a Linux system seems to have no line breaks on Windows, because Windows is using another character for a line break than Linux has written to the file. To make this file readable on the Windows system, it is necessary to change the character used as a new line.

Rewriting Line Breaks

If you want to read files from other systems with other line breaks on your system, you can rewrite the line breaks used in the file to the character for a line break of your system. This can be carried out with a great number of files at once with the software TextConverter very easily and comfortably.

First of all, open the file or the files with the TextConverter. You can simply drag and drop the files or complete folders on the software. After that, you choose the action "Line Breaks" on the right side of the main program. Generally, the old line break of your file will be detected automatically, so that you only have to choose the new line break for your file. For example, you can choose "CRLF - Windows" and files from Linux oder Mac will be readable on Windows. Of course, with the program, it is also possible to go the other way around. You can also change the Windows line break to any other line break of another system.