OS/2 provides applications with several functions to obtain information about and manipulate code pages. These functions enable applications to determine and set the current code page.
OS/2 code page management functions enable applications to read keyboard input and write display and printer output for multiple processes using ASCII-based data encoded in different code pages.
The system switches to the required code page, for a code-page-supported device, before input or output.
Note: In the example code fragments that follow, error checking was left out to conserve space. Applications should always check the return code that the functions return. Control Program functions return an APIRET value. A return code of 0 indicates success. If a non-zero value is returned, an error occurred.