DosQueryCp allows a process to query its current process code page and the prepared system code pages.

The process code page identifier previously set by DosSetProcessCp or inherited by the process is returned to the caller. An input list size of two bytes returns only the current process code page identifier. If no code pages have been prepared with the CODEPAGE command, a length of two and a current code page identifier value of zero are returned.

Note: If no CODEPAGE= statement exists in CONFIG.SYS, the operating system uses the first codepage that it finds in the COUNTRY.SYS file for that country.