APPLICATION NOTE #111 CHANGING CODE PAGES Versions 3.30 and higher of PC-DOS and MS-DOS support a feature called code pages, which are language-specific character sets. You can use code pages to configure your computer's display for many different languages that use a Roman alphabet. Besides the default United States character set, DOS includes a multilingual set, a Portuguese set, a French Canadian set, and a Norwegian set. This application note explains how XyWrite III, XyWrite III Plus, and Signature interact with the five international code pages, and how you can change the code page in effect on your computer. INTRODUCTION Every computer has a built-in character set called a hardware code page that supports the native language of the country in which it is manufactured or used. DOS includes prepared code pages that allow you to display the character sets of other languages. Every code page has 256 displayable characters, and the first 128 are the same for every code page. Software manufacturers can use the character set associated with the hardware code page, a subset of those characters, or a different character set. XyWrite has a 256-character set and uses code page 437, the United States code page. If your computer is configured for code page 437, then you can display any of the 256 characters in the ASCII extended character set (see Appendix A of the XyWrite III Plus Reference Guide). If your computer is configured for a different code page, XyWrite displays only the characters associated with that code page. (Attached to this application note are tables of the international code pages.) Signature has a 780-character set, which includes characters from all the standard code pages, plus the Bitstream international character set (see Appendix C of the Signature Reference Guide). Because a code page only has 256 characters, you cannot see all of the Signature-supported characters in draft view (see Note #1). When you change code pages, different characters are displayed. By default, Signature uses code page 850 for the first 256 characters; this is the multilingual code page, which includes many more accented characters than the United States code page. If your computer is set up for code page 437 (the U.S. character set), you will notice that Signature does not display some of the characters between 128 and 256 in draft view; instead, it displays a bold number in square brackets. At the same time, Signature does display some of the characters higher than 256. For example, when you run Signature on a computer set up for code page 437, Signature does not display character 155 (the lowercase o slash character) because it is not part of code page 437. However, Signature does display character 299 (the greater than or equal to symbol) because it is part of code page 437. You do not have to use the code page that your computer was configured with. For example, if you prefer to use the multilingual code page, you can easily reconfigure your computer. The process, called code page switching, is described in the following paragraphs. REQUIRED HARDWARE In order to take advantage of the code page switching feature, you must have one of the following computer types: * IBM Personal System/2 (any model) * IBM PC, XT, AT equipped with an EGA or VGA display card * Any fully IBM compatible equipped with an EGA or VGA display card In order for XyWrite or Signature to print the characters in any code page, you must have a printer that supports them and a properly configured printer file. REQUIRED SOFTWARE To use code page switching, the following DOS files must be installed on your disk. Normally, they are installed in the DOS directory. COUNTRY.SYS DISPLAY.SYS DOS 3.3 or higher EGA.CPI (used for EGA, VGA, and IBM PS/2) MODE.COM NLSFUNC.EXE If the files are not there, install them from your master DOS diskettes. SETTING UP CODE PAGE SWITCHING To use the code page switching feature, you need to modify CONFIG.SYS and AUTOEXEC.BAT. You can edit these files easily from within XyWrite or Signature, as explained below. Once the files are modified, you need to reboot your computer. Modifying CONFIG.SYS You need to modify CONFIG.SYS so that it installs DISPLAY.SYS. 1. Call CONFIG.SYS from the root directory. For example: F5ca c:\config.sys 2. Add the following command to the file: device=d:\path\display.sys con:=(ega,code,n) where d:\path is the location of DISPLAY.SYS; code is the hardware code page your computer uses; and n is the number of prepared code pages that you want to reserve space for (on EGA, VGA and IBM PS/2 computers, n can be up to 6). The options for code are: 437 United States 850 Multilingual (supports 11 languages) 860 Portuguese 863 French Canadian 865 Norwegian For example, if your computer is set up for code page 437 and you want to support a single prepared code page, add the following command to CONFIG.SYS: device=c:\dos\display.sys con:=(ega,437,1) 3. Store CONFIG.SYS. Modifying AUTOEXEC.BAT You need to modify AUTOEXEC.BAT so that it loads the country-specific information. 1. Call AUTOEXEC.BAT from the root directory. Type: F5call c:\autoexec.bat 2. Add the following command to the file. Insert this command before the command that loads Signature or XyWrite. nlsfunc d:\path\country.sys where d:\path is the location of COUNTRY.SYS. 3. Add the following MODE command to the file after the NLSFUNC command: mode con codepage prepare=((cp)d:\path\ega.cpi) where cp is the code page number or numbers you want to install (valid numbers are 437, 850, 860, 863, and 865) and d:\path is the location of EGA.CPI, the code page information file for EGA, VGA, and PS/2 computers. For example, the following commands set up support for code page 850: nlsfunc c:\dos\country.sys mode con cp prep=((850)c:\dos\ega.cpi) 4. Store AUTOEXEC.BAT. Rebooting the Computer After you modify both CONFIG.SYS and AUTOEXEC.BAT, quit XyWrite or Signature and then reboot your computer to have the changes take effect. ACTIVATING CODE PAGE SWITCHING Once you have completed all the steps in the section ``Setting Up Code Page Switching,'' you use the DOS CHCP command to activate a new code page. The form of the command is: CHCP cp where cp is the number of the code page you want to activate. There are several ways you can issue this command. * In the AUTOEXEC.BAT file. If you plan to always use a code page other than the default, you can add the CHCP command to the AUTOEXEC.BAT file. Be sure to insert it after the MODE command that defines the code pages you installed. * From the DOS prompt. * From inside Signature or XyWrite, using the DOS command. For example: Type: F5dos /c chcp 850 PRINTING A DOCUMENT If your printer can print the special characters that belong to a code page character set, you can modify your printer file to output them. For information on this procedure, call Technical Services. Note #1 Draft View vs Graphic View. In Signature, there is a WYSIWYG display, called graphic view. Graphic view is not limited to the 256 characters supported by a code page; instead, it uses the characters from the Bitstream outline fonts that are delivered with Signature. Even in graphic view, some Signature characters are not displayed because they are not part of the Bitstream Speedo fonts delivered with Signature. Refer to Appendix C of the Signature Reference Guide for information about the characters that are displayed in graphic view. Note #2 More Information. This application note presents one way to modify your setup to support code page switching, but there are other options. For more information about code pages and the associated DOS commands, refer to your DOS manual. Note #3 UltraVision. UltraVision, a screen enhancer produced by Personics, does not support code page switching. Note #4 Additional Code Pages. This application note describes the prepared code pages that are included with DOS versions 3.30 and later. There are many other code pages available, and not all the descriptions in this application note apply to the add-on code pages.