DB Access Module for ODBC User’s Guide : Chapter 2 Technical Information : Internationalization
Internationalization
SourcePro DB fully supports the Unicode (UTF-16) data standard. This functionality allows you to move Unicode data to and from your database.
While SourcePro DB has support for these types, some ODBC driver managers and drivers do not. If your ODBC driver manager and driver both support Unicode strings, you may move UTF-16 data to and from your data source using classes RWBasicUString and RWUString. Internally, these types are mapped to SQL_C_WCHAR.
Prerequisites
This section describes the prerequisites for internationalization.
Environment Variables: There are no environmental prerequisites to use internationalization functionality with DB Access Module for ODBC.
Environment Handle API Changes: No additional environment handle methods were added to the DB Access Module for ODBC to handle internationalization functionality.
Data Bindings
Unicode data can be moved to or from your application with the classes RWBasicUString or RWUString which are mapped to the ODBC Unicode SQL type identifiers SQL_WCHAR, SQL_WVARCHAR and SQL_WLONGVARCHAR.
Limitations
This sections describes some of the limitations for SourcePro DB.
Metadata: SourcePro DB does not currently support Unicode logins, passwords, or metadata.
Use of RWWString in Unicode Applications: Due to platform inconsistencies, Rogue Wave recommends that you do not write Unicode applications with RWWString. On platforms where a wchar_t is defined as greater than 2 bytes, a costly conversion will occur to convert your data from 2-byte UTF-16 to 4-byte padded UTF-16. Furthermore, after the conversion, your application will still not have valid Unicode. Whether the size of wchar_t is 2 bytes or 4 bytes, the RWWString will represent only UTF-16 data, not a true wide string, as it has not been localized. Rogue Wave recommends using one of our Unicode string containers, RWBasicUString (from the Essential Tools Module) or RWUString(from the Internationalization Module).