Determining runtime code page and country code

Selecting MRI of the appropriate language is one of the important points of DBCS-enabling. In order to determine in which language MRI should be used, you need to find the runtime code page and country code.

┌──────────────────────────────────────────────────────────────────────┐
│DosQueryCp is to find the runtime code page. DosQueryCtryInfo (changed│
│from DosGetCtryInfo) and PrfQueryProfileInt are to find the runtime   │
│country code.                                                         │
└──────────────────────────────────────────────────────────────────────┘

DosQueryCp (changed from DosGetCp) is used for finding the runtime code page. PrfQueryProfileInt is used for a PM program to find the runtime country code. You can also use DosQueryCtryInfo (changed from DosGetCtryInfo) for obtaining the county code in a non-PM application.

The following shows the syntax for the APIs.

In general, a code page or a country code is used to select a proper MRI for the runtime environment, and to perform character data conversion when the data is exchanged among processes or systems. See -- Reference NLSFUNC not found -- for a programming example of the APIs. Also for a programming example of the APIs. Also refer to Determining a national language for MRI for the runtime MRI switching and refer to Exchanging data with Host software for the code conversion.