System Default, ANSI Codepage and OEM Codepage

System Default, ANSI Codepage and OEM Codepage

The original US Open32 supports the default ANSI codepage and the default OEM codepage. But the logic to determine these two codepages is temporal and short for National Language Support.

Before the default ANSI codepage and the default OEM codepage are determined, the user default locale is determined, which is described in the sub-section below. With this default locale ID, Open32 can determine the default ANSI codepage and the default OEM codepage uniquely, because Open32 keeps an internal locale table that contains these two codepage members and some other members for all possible locales. What Open32 needs to check at run-time is whether thus determined codepages are valid on the system or not. This check can be easily done using the supported/installed ANSI codepage list and OEM codepage list, which are already listed in the previous sub-section. If thus determined ANSI codepage is not valid on the system, Open32 then adopts the current process'es WIN codepage. Similarly, if thus determined OEM codepage is not valid on the system, Open32 then adopts the current process'es CP codepage.


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