This example translates a character from US code page 437 to multilingual code page 850.

#define INCL_WINCOUNTRY         /* Window Country Functions     */
#include <os2.h>

HAB     hab;            /* anchor-block handle                  */
UCHAR   ucDest;         /* translated character                 */
UCHAR   ucSource = 'A'; /* source character                     */
ULONG   idCpSource=437; /* Code page of source character (US)   */
ULONG   idCpDest=850;   /* Code page of dest. character (multi) */

ucDest = WinCpTranslateChar(hab, idCpSource, ucSource, idCpDest);


[Back] [Next]