The following two sections describe two methods for setting a code page for a specific device, including a console screen and a printer.
This example uses two prepared code pages—no hardware code pages are used—to set up the system to support Denmark/Norway and the Multilingual national languages.
To the end of your CONFIG.SYS file, add the following on separate lines:
country=045,,c:\dos\country.sys device=c:\dos\display.sys con:=(ega,,2) install=c:\dos\nlsfunc.exe c:\dos\country.sys
These CONFIG.SYS commands tell DOS that the EGA's hardware code page is not used, and that you are allocating space for two prepared code pages. Also, they load memory-resident, national support functions.
To the AUTOEXEC.BAT file, add the following exactly as shown (on separate lines):
mode con cp prep=((865,850) c:\dos\ega.cpi) keyb dk,,c:\dos\keyboard.sys chcp 865
If the AUTOEXEC.BAT file contains two lines at the end of the file that invoke AUTOEXEC.BAT files on the E: or H: drive, place the international command lines before these lines.
These AUTOEXEC.BAT commands do the following:
They load prepared code pages 865 and 850 into memory—they get the code pages from the EGA.CPI file.
They load the Denmark (dk) keyboard program.
They start the system with the Denmark/Norway (865) code page.
Refer to your DOS manual for information on the PRINTER.SYS file and the types of printers it supports for code-page switching.
The second example also uses two prepared code pages. It assumes you have an IBM Proprinter model 4201 connected to LPT1. The system is set up to support Denmark/Norway and the Multilingual national languages.
To the end of your CONFIG.SYS file, add the following on separate lines:
country=045,,c:\dos\country.sys device=c:\dos\display.sys con:=ega,,2 device=c:\dos\printer.sys lpt1:=4201,,2 install=c:\dos\nlsfunc.exe c:\dos\country.sys
These CONFIG.SYS commands tell OpenDOS that the hardware code page is not used, and that you are allocating space for two prepared code pages in each device. Also, they load memory-resident, national support functions.
To the AUTOEXEC.BAT file, add the following on separate lines:
mode con cp prep=((865,850)c:\dos\ega.cpi) mode lpt1 cp prep=((865,850)c:\dos\4201.cpi) keyb dk,,c:\dos\keyboard.sys chcp 865
If the AUTOEXEC.BAT file contains two lines at the end of the file that invoke AUTOEXEC.BAT files on the E: or H: drive, place the international command lines before these lines.
These AUTOEXEC.BAT commands do the following:
They load prepared code pages 865 and 850 into memory. For the EGA, they get the code pages from the EGA.CPI file. For the printer, they get the code pages from the 4201.CPI file.
They load the Denmark (dk) keyboard program.
They start both devices with the Denmark/Norway (865) code page.