OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OCILIB supports both ANSI and Unicode.
Oracle started a real Unicode support with Oracle 8i but only for bind and fetch data. All SQL and PL/SQ/ statements, database objects names were still only supported in ANSI.
With Oracle 9i, Oracle provides a full Unicode support.
So depending on the compile time Oracle library or the runtime loaded library, Unicode support differs.
OCILIB supports:
OCILIB uses the character type 'otext' that is a define around char and wchar_t depending on the charset mode.
Well, ISO C:
OCILIB uses char/wchar_t strings for both public interface and internal storage.
Unicode builds of OCILIB initialize OCI in UTF16 Unicode mode. Oracle implements this mode with a 2 bytes (fixed length) UTF16 encoding.
So, on systems implementing wchar_t as 2 bytes based UTF16 (e.g. Ms Windows), strings are directly passed to Oracle and taken back from it.
On other systems (most of the Unix systems) that use UTF32 as encoding, (4 bytes based wchar_t), OCILIB uses:
Buffer expansion is done in place and has the advantage of not requiring extra buffer. That reduces the cost of the Unicode/ISO C handling overhead on Unix systems.
OCILIB fully supports UTF8 strings :