Design of Open32 National Language Support

Design of Open32 National Language Support

The National Language Support functions in Open32 NLS Extension are designed to be compatible with Windows 95 NLS functions to assist application developers to share their program code as much as possible between Open32 and the most recent Win32 platforms. Also, with Open32 NLS functions, developers can upgrade their existing SBCS only Open32 applications to have NLS capability for International Markets.

Note: Current Open32 NLS Extension does not support Bi-Directional Writing System.

Sharing Documents between Platforms

Apart from developing program code, there is an issue in Open32 National Language Support. There are many documents created with NLS applications running on Win32 platforms. In those documents Win32 platform specific NLS values (i.e. , locale id or codepage id) may be stored. By sharing or transmitting these documents in a Network environment, a Open32 application will receive these Win32 NLS values, which are invalid in OS/2 environment, through the documents.

Because there is no clear NLS value mapping rule between OS/2 and Win32 platforms, it is difficult for Open32 applications to find corresponding OS/2 NLS values from given Win32 NLS values.

In comparison with this, it is harder to expect that the applications running on Win32 platforms have mapping services from OS/2 NLS values to Win32 NLS values. To allow transmitting documents from Open32 applications to the applications running on Win32 platforms, one of feasible choices is that the Open32 applications store Win32 NLS values in those documents.

To solve this issue, Open32 NLS Extension uses Win32 platform specific NLS values as valid parameters for Open32 NLS APIs.

Matching Face names between Platforms

The same kind of issue is identified in matching font facenames stored in documents. A platform may bundle some unique typefaces, which are not available in the others. Because bundled and installed as a platform standard, these facenames are more often referred in the documents created in that platform.

Open32 NLS Extension itself does not take care of it. This issue will be solved with PM Font Alias function, which allows users to assign desired alias names to the installed OS/2 PM typefaces in the system, to emulate Win32 platform specific facenames.

Font Mapping

A Win32 platform has its built-in font mapper, which implicitly helps application to find out the closest match from the installed typefaces to the application desiring one, when selecting a logical font into a specific device. In this font mapping process , the character set of font is treated as the most significant attribute so that application can expect that the text in an imported document will be at least readable.

In OS/2, selecting a logical font into a specific device does not contain font mapping process. Failing to find exact match falls directly into system default font, which may not be compatible with the character set which the application desires.

There are many Win32 applications and documents, which depend on this font mapper. To support these applications and documents, Open32 NLS Extension has Win32 compatible font mapper emulation built in it.

Font for Graphical User Interface

The metrics of a font used in the Graphical User Interface (GUI) affects directly to the layout of panels supplied by applications. Because an application has many panels, the difference of GUI font metrics will affect directly to the amount of (not essential) porting work load between platforms.

Open32 NLS Extension itself does not take care of it , but the base OS/2 PM is expected to provide Windows 95 compatible GUI font to make panel layouts common between platforms as much as possible.

Switching between Input Languages

The most recent Win32 platforms allow users to switch desired locale by changing Input Language, which can be virtually considered as a kind of software keyboard that realizes logical keyboard layout and the functionality. The Input Method Editors, used in Far East countries to enable typing complex ideographs, are also implemented in this mechanism.

Open32 NLS Extension supports both switching Input Languages and typing ideographs by mapping these Win32 logical keyboard layouts to the OS/2 Input Method Editors over the base OS/2 Input Method (IM) services. Because an OS/2 Input Method Editor represents a specific Input Language, this mechanism also allows for users to switch Input Languages on the fly.

Note: At this moment OS/2 IM services are available only in DBCS versions of OS/2.

Compatibility with Existing SBCS only Open32 Applications

Some implicit functions, like the font mapper, are added to Open32 NLS Extension. Because the results of these functions may not be compatible with the results expected by existing SBCS only Open32 applications but necessary to support NLS applications , Open32 NLS Extension will disable some extended functions at starting when requested to start Open32 application on any of the following conditions an SBCS codepage , to keep backward compatibility . This means full Open32 National Language Support functionality is available only in DBCS codepages. But, please note that this mechanism is applied only to the initial (and a few more) release(s) of Open32 NLS Extension and will be removed in the future when Open32 NLS Extension functions are integrated into the base Open32 module:

Note: This is the current limitation. The limitation will be removed in a future release.

Note:


[Back: Understanding Win32 National Language Support]
[Next: Writing International Applications using Open32]