SunPCi User's Guide

DOS Character Set

Whenever you, or a program you are using, creates a file under DOS, the DOS character set is used. Whenever you create a file under the Solaris system, the ISO 8859 Latin 1 character set is used. You do not need to be aware of this unless you want to use a DOS file in the Solaris environment, or a Solaris file in the DOS environment. To convert files from one format to the other, two conversion utilities are provided—dos2unix and unix2dos. Only characters that are available in both the DOS character set and the ISO 8859 Latin 1 character set can be converted between formats. Fortunately, most commonly used characters are available in both character sets.

However, if you have a text file that contains special characters, these characters may not be convertible. Most word processors and text-processing programs use special codes in their files to indicate character style or page layout. Most of these programs, however, have options to store the file as “text only” or to “print to a file,” which eliminates the special codes and allows you to convert the file using the dos2unix and unix2dos commands.