InfoCenter
InfoCenter
Software
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 LF | 0D 0A / 13 10 | ASCII Windows, DOS, OS/2, TOS Atari, CP/M |
| LF | 0A / 10 | ASCII Unix, Linux, Mac OS X, BSD, AmigaOS |
| CR | 0D / 13 | ASCII Mac OS bis Version 9, Apple II |
| NEL | 15 / 21 | EBCDIC AIX OS, OS/390 |
| FF | U+000C | Unicode Form Feed |
| NEL | U+0085 | Unicode New Line |
| LS | U+2028 | Unicode Line Separator |
| PS | U+2029 | Unicode 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.