Most OS/2 programming environments normally deal with single-byte character values (such as the C char type). When dealing with Unicode text, however, conversion between these values and double-byte UniChar characters becomes an issue.
A UniChar value can be assigned in a number of ways. If you know the UCS codepoint of the desired character, you can assign it directly as an integer. For example, an uppercase "A" has a codepoint of U+0041 (0x0041).
UniChar uc = 0x0041;
Alternatively, since most OS/2 C compilers define the wchar_t type as an unsigned short integer, it is possible to convert character values into UniChar values (and vice versa) using C wide-character conventions.
    UniChar uc = L'A';
    UniChar *ucString = (UniChar *) L"Now is the time";
    printf("%lc - %ls\n", uc, ucString );
However, this technique should be avoided when dealing with characters that may fall outside the basic ASCII range. This is because, for most standard OS/2 codepages, only the ASCII characters map to the equivalent values within the UCS codespace.
The most comprehensive way to convert between single-byte and UniChar characters is to use the ULS codepage conversion functions: