October 15, 2001, 2:49 PM — With the ability to move documents and text files so easily from one system to another, you would think that some common format could be devised for information. Unfortunately, moving a Word document or a spreadsheet from a Windows environment to a Unix environment leaves you with a document or spreadsheet that cannot be read or used by any application in the Unix world. There are exceptions -- but very few.
Ah, but what about the humble text file? Surely files containing nothing but ASCII characters must be portable across multiple systems. Well, that's true ... mostly.
The gotcha in moving text files between systems is most apparent in moving text from an MS-DOS or Windows environment to a Unix environment. This problem comes up often because these three operating systems are so common. Of course, you and I know that DOS is dead. Just don't tell that to all those people running those thousands of vertical market DOS applications -- none of which were ever ported to Windows, since their software vendors went out of business while trying to do the ports.
Aside from the need to move text files in general, you no doubt also have many general purpose programs, probably written in C code, that you'd like to port from DOS to Unix or vice versa. ("Gee, Edwina, remember that utility that you wrote to unscramble the framis-gaggle? I bet you could move that code to Unix and it would compile and run there.") Yes, she probably could move it, but the text files that contain the source code for the framis-gaggle unscrambler will use a different end-of-line marker in the Unix world than it did under DOS or Windows, resulting in some tedious editing for poor Edwina. The same problem will arise for users who just want to move plain old text documents from platform to platform. Why should this be the case?
You have probably heard terms like carriage return, line feed, and newline bandied about in relationship to text files and printing, but you might not know exactly what they are, and how they relate to text files.