Prerequisites
This section discusses prerequisites.
Environment Variables
The DB Access Module for Oracle OCI does not require any specific client setting to insert or read data if your database is set up correctly to use UTF-16 encoding. However, you are advised to set the appropriate NLS_LANG in your operating system environment or Windows registry to customize the behavior of the Oracle OCI client. For customized error messages, you must set the correct locale in your environment along with NLS_LANG. NLS_LANG should be set before executing the application.
Database NLS_NCHAR_CHARACTERSET
To use internationalization features, your database should be created with NLS_NCHAR_CHARACTERSET set to AL16UTF16 or AL32UTF8. If it is set to AL32UTF8, a conversion between UTF-16 and UTF-8 encodings is initiated on the server side.
All data passed to and read back from the DB Access Module for Oracle OCI with Oracle datatypes NCHAR and NVARCHAR2 should be in UTF-16 encoding.
Database Length Semantics
NLS_LENGTH_SEMANTICS of the Oracle database can be set to byte or character semantics. Tables created under byte semantics are different than tables created under character semantics. Table created under byte semantics specify column length in bytes. Tables created under character semantics specify column length in characters. Both types of semantics are implemented as is from Oracle; the DB Access Module for Oracle OCI does not alter your statements. Please see the Oracle documentation for more details.