CHCP

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 801
Prepared code pages 801 1101


To change the code page setting from 801 to 1101, enter

chcp 1101


Return to Mission Control home page         Return to DOS Command Index