Compatibility of wide-character data types

Wide character data types are an alternative form for the processing of multibyte characters. A wide-character form of a code set involves the normalization of the size of each multibyte character so that each character is the same size.

A legacy DataBlade® API module might use any of the following data types to hold wide characters.
Wide-character data type Description Drawback
mi_wchar A legacy DataBlade API data type currently defined as unsigned short on all systems The DataBlade API does not provide wide-character functions that operate on mi_wchar values.
wchar_t An operating-system data type that is platform-specific The operating-system provides wide-character functions that operate on wchar_t values. Use of these functions is platform-specific.

The HCL® OneDB® GLS library provides the gl_wchar_t data type for support of wide characters. HCL OneDB GLS also provides its own set of wide-character functions that operate on gl_wchar_t. Use of the HCL OneDB GLS wide-character functions removes platform dependency from your application and provides access within your DataBlade API module to HCL OneDB GLS locales.

The HCL OneDB GLS library does not provide any functions for conversion between gl_wchar_t and mi_wchar or gl_wchar_t an wchar_t. If a DataBlade API module continues to use either mi_wchar or wchar_t and also needs to use the HCL OneDB GLS wide-character processing, you must write code to perform any necessary conversions.