SQL character type for Unicode/UTF-8
This section explains database server specifics regarding Unicode / UTF-8 support with character string SQL types.
All database servers can store UNICODE data in character strings types, but there are some
specifics you must be aware of. Genero BDL programs typically use the CHAR
and VARCHAR
types to store UTF-8 strings. But the corresponding SQL type may
have a different name, depending on the database server type. Use the correct SQL type when
creating your database tables. When the database uses a different UNICODE codeset as UTF-8 to
store the character string data, the database client or the Genero database driver take care
of the codeset conversion, as long as the runtime system and database client locale are
properly defined.
Database Server Type | Char types to be used for Unicode/UTF-8 |
---|---|
IBM® Informix® | CHAR /
VARCHAR , the database must be created with UTF-8 locale. |
Microsoft™ SQL Server | NCHAR / NVARCHAR , to store UTF-16 data
(drivers make the conversion for application codeset UTF-8)The For more details, see the topic about character data type usage with Microsoft SQL Server. |
Oracle® MySQL | CHAR /
VARCHAR if the database locale is UTF-8.
For more details, see the topic about character data type usage with Oracle MySQL. |
Oracle Database Server | CHAR /
VARCHAR2 if the database locale is UTF-8.
For more details, see the topic about character data type usage with Oracle DB. |
PostgreSQL |
For more details, see the topic about character data type usage with PostgreSQL. |
SAP HANA® |
For more details, see the topic about character data type usage with SAP HANA. |
SQLite |
For more details, see the topic about character data type usage with SQLite. |
Dameng® | CHAR / VARCHAR , the database locale must be
UTF-8.For more details, see the topic about character data type usage with Dameng. |