If you open a Windows file in a UNIX editor like “joe” or “vi”, you will see a control character (the CR) at the end of each line. if you open a UNIX file in Microsoft Notepad, it will display the text as if the file contained no line breaks at all. Problems arise when transferring text files between different operating systems and using software that is not smart enough to detect the line break style used by a file. OS X also uses a single LF character, but the classic Mac operating system used a single CR character for line breaks. UNIX (Including Linux and FreeBSD) uses an LF character only. Windows, and DOS before it, uses a pair of CR and LF characters to terminate lines. Free trial download Line Breaks in Windows, UNIX & Macintosh Text FilesĪ problem that often bites people working with different platforms, such as a PC running Windows and a web server running Linux, is the different character codes used to terminate lines in text files.
0 Comments
Leave a Reply. |