Windows Codepage v.s. OS/2 Codepage

Windows Codepage v.s. OS/2 Codepage

The definition of codepage (mapping between character code and its graphic) is the same between Windows and OS/2 for SBCS codepages, so application programmer does not need to take care whether it is the number of Windows or OS/2 codepage. However, regards to DBCS codepages, the definition of codepage is not always the same. For example, Japanese codepage 932 on Windows means JIS 90 character set, new JIS sequence. On the other hand, on OS/2, Japanese codepage 932 means JIS90 character set, old JIS sequence or JIS90 character set, new JIS sequence, depending on the user's selection at installation time. OS/2 has another Japanese codepage 942, which has five more SBCS characters than that of codepage 932. OS/2 codepage 942 also has two sequence choices; new JIS order and old JIS order. Moreover, OS/2 has yet another Japanese codepage 943, from OS/2 Warp Connect version 4.0 (excluding OS/2 Warp Server version 4.0). This codepage was defined to use the same Japanese character set, the same JIS sequence as Windows Japanese codepage 932 on OS/2.

So, there's three two alternatives for mapping Windows codepag 932 on OS/2; 932 , and 942, and 943. Open32 maps Windows codepage 932 to either of the three two Japanese OS/2 codepages according to its availability. Of course, the user can disable all both the two Japanese codepages at the same time if he/she would like to do, but it will just fall into run-time error when used.

A similar problem occurs for PRC (Peoples Republic of China). Windows codepage 936 corresponds with OS/2 codepage 1381 but not at all compatible with OS/2 codepage 936. So, if Windows codepage 936 is not translated to OS/2 codepage 1381 in Open32, user's data would be completely mis-processed.

The following table shows the required translation of codepages between WIN32 world and OS/2 world, which is performed at the entry of Open32 API handlers and also at the default ANSI/OEM codepage determination time, the latter of which is described in the next section.

┌──────────┬───────────────┬────────────────────┐
│Country   │WIN32 Codepage │OS/2 Codepage       │
├──────────┼───────────────┼────────────────────┤
│Japan     │932            │932 or 942  or 943  │
├──────────┼───────────────┼────────────────────┤
│PRC       │936            │1381                │
└──────────┴───────────────┴────────────────────┘


[Back: Supported / Installed Codepages]
[Next: Comparison Table of Supported Codepages]