Country Code and Combined Code Page

Country code is defined in the OS/2 system. You can find the statement in the CONFIG.SYS file of an OS/2 system. It is an incorrect idea to check the country code and decide if the current environment supports DBCS or not. OS/2 supports a primary code page and a secondary code page with one country code. In DBCS OS/2, the primary must be a DBCS code page and the secondary code page can be an SBCS or a DBCS codes page. Therefore you can not tell the current code page is an SBCS code page or a DBCS code page by a given country code. You can check if the code page is supported in a given country code by an OS/2 API, DosQueryCtryInfo. The country information resides in the COUNTRY.SYS file.

In personal system software, DOS or OS/2, a system value called DBCS environment vector is provided to application program to check out if the current environment support DBCS or not. Actually, this value is the DBCS first byte code range of the DBCS characters that are provided in the current using character set. If this value is 00, this means there are not DBCS character in the current character set, or the current character set is an SBCS character set. You can get the DBCS environment vector value by an OS/2 API, DosQueryDBCSEnv (32 bit API) or DosGetDBCSEnv (16 bit API not supported from version 2.0). See the How To Use Both DBCS and SBCS in a String and OS/2 Common DBCS Related Functions for more detailed information.


[Back: DBCS PC Code Area Tables]
[Next: How To Use Both DBCS and SBCS in a String]