@tshering: Finally discovered why I was seeing the wrong line endings... It wasn't the editor, rather it was WINZIP!
I was using Winzip 14.5 to extract the tar file, and in it's preferences I had the option "TAR file smart CR/LF conversion" set. I didn't even know that option existed until I went looking.
From the help file
Quote:
TAR file smart CR/LF conversion - When selected, this option determines if "smart" CR/LF conversion should be performed when extracting from TAR files. CR/LF is short for Carriage Return/Line Feed, the standard end of line indicator. This option can be useful when a TAR file contains text files created on a Unix or Macintosh machine. Unix text files usually contain lines ending in Line Feed characters only, and Macintosh text files usually contain lines ending in a Carriage Return character. The standard Windows Notepad program and many other Windows programs require a Carriage Return and Line Feed at the end of each line. When the TAR File smart CR/LF conversion option is in effect, WinZip determines whether to perform CR/LF conversion file inside a TAR file by looking at the first 80 characters in each file. If the file is a text file then single LF and CR characters are converted to CR/LF pairs so the file can be viewed by Notepad and other Windows viewers. Files are considered text when the first 80 bytes contain only characters with ASCII values between 0x20 and 0x7f, carriage returns, line feeds, form feeds, tabs, and other alphanumeric characters (as determined by the Windows IsCharAlphaNumeric API).
|