CHCP
Type: Internal (3.3 and later)
Syntax:
CHCP
CHCP (codepage)
Purpose: Displays or changes the code page that DOS will use.
Changes
the code page used by DOS for device-related system operations such as
displaying or printing special language characters. (The code page is a
table
that defines the character set for a country.)
Discussion
To use this command, the code page number must have been previously set
(refer
to Appendix B for more information).
After this command sets a new code page, DOS will access the COUNTRY
command in
the CONFIG.SYS file (when the computer is started) to set up special
foreign
language characters for display or printing. Programs run after using
this
command to change the code page will use the new code page.
The NLSFUNC command must be used prior to using this command. Also,
device
drivers must be prepared in advance (refer to the MODE command).
If you select a code page that has not been prepared for your system, DOS
will
display an error message similar to the following:
Code page xxx not prepared for system
Active code page: xxx
Prepared system code pages: xxx xxx
The Xs will be replaced by the appropriate number. If you change code
pages and
a device has not been prepared for use with that code page, the code page
will
still be changed. However, DOS will display an error message similar to
the
following:
Code page xxx not prepared for device xxx.
The Xs will be replaced by the appropriate number.
Examples
If you enter CHCP without entering a number, the program will display a
message
similar to the following:
Active code page 437
Prepared code pages 437 863
To change the code page setting from 437 to 863, enter
chcp 863
Back to the
Easy DOS
Command Index