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.
| Wide-character data type | Description | Drawback |
|---|---|---|
| mi_wchar | A legacy data type currently defined as unsigned short on all systems | The 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® Informix® GLS library provides the gl_wchar_t data type for support of wide characters. HCL® Informix® GLS also provides its own set of wide-character functions that operate on gl_wchar_t. Use of the HCL® Informix® GLS wide-character functions removes platform dependency from your application and provides access within your module to HCL® Informix® GLS locales.
The HCL® Informix® 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 module continues to use either mi_wchar or wchar_t and also needs to use the HCL® Informix® GLS wide-character processing, you must write code to perform any necessary conversions.