Conversion To / From Unicode
As previously described, DBCS codepage definition is not always the same between Windows and OS/2. From this reason, the mapping to and from Unicode is slightly different between the two. This results in the difference of the converted character to/from Unicode by MultiByteToWideChar and WideCharToMultiByte API for some cases.
From programmer's point of view, the difference in 0x00 - 0x7F range has a very important meaning. On Windows, code point 0x5C and 0x7E in a DBCS codepage is converted to U005C and U007E respectively. In other words, on Windows, code point below 0x80 is c onverted to Unicode by just adding 0x00 at its top regardless what graphic symbol is assigned to it. (For example, 0x5C in Japanese and Korean codepage is Yen and Won respectively, but it is converted to U005C whose definition is Unicode backslash.) On the other hand, on OS/2, 0x5C is converted to U00A5 in Japanese codepage and U20A9 in Korean codepage. But, fortunately, on OS/2, the modifier path=yes/no can be specified for UCONV object and programs can control the conversion for 0x5C and 0x7E characters. From this fact, it is considered that Windows architect has decided to take program code compatibility, while OS/2 architect has decided to take both graphic symbol compatibility and program code compatibility, at least for code point below 0x80.
For Unicode conversion to/from code point below 0x80, Open32 keeps compatibility with Windows because it is highly possible that internationalized Windows software may assume such conversion, especially for path string parsing and C source code parsing. To accomplish this conversion, Open32 always specifies path=yes modifier for UCONV object. This modifier makes effect on code point 0x5C and 0x7E and Unicode code point U005C and U007E as follows.
┌─────────────────────┬─────────────────────┐ │ path =yes │ path = no │ ├───────────┬─────────┼───────────┬─────────┤ │ CP = 932 │ Unicode │ CP = 932 │ Unicode │ ├───────────┼─────────┼───────────┼─────────┤ │ 0x5C │ U005C │ 0x5C │ U00A5 │ ├───────────┼─────────┼───────────┼─────────┤ │ 0x7E │ U007E │ 0x5C │ U203E │ └───────────┴─────────┴───────────┴─────────┘