The choice of locale can affect the following character data types, which are individually described in sections that follow:
The CHAR data type stores character data in a fixed-length field. Data can be a string of single-byte or multibyte letters, numbers, and other characters that are supported by the code set of your database locale.
This list summarizes how the choice of a locale affects the CHAR data type:
For example, if you define a CHAR column as CHAR(10), the column has a fixed length of 10 bytes, not 10 characters. If you want to store multibyte characters in a CHAR column, keep in mind that the total number of characters you can store in the column might be less than the total number of bytes you can store in the column. Make sure to define the byte size of the CHAR column so that it can hold enough characters for your purposes.
The database locale must support the characters that you want to store in CHAR columns.
The client application performs code-set conversion of CHAR data automatically if CLIENT_LOCALE differs from DB_LOCALE.
The VARCHAR data type stores character strings of up to 255 bytes in a variable-length field. Data can consist of letters, numbers, and symbols. CHARACTER VARYING is handled exactly the same as VARCHAR. The following list summarizes how the choice of a locale affects the VARCHAR data type:
For example, if you define a VARCHAR column as VARCHAR(10,6), the column has a maximum length of 10 bytes and a minimum reserved space of 6 bytes. If you want to store multibyte characters in a VARCHAR column, keep in mind that the total number of characters you can store in the column might be less than the total number of bytes you can store in the column. Make sure to define the maximum byte size of the VARCHAR column so that it can hold enough characters for your purposes.
The database locale must support the characters that you want to store in VARCHAR columns.
The client application performs code-set conversion of VARCHAR data automatically if CLIENT_LOCALE differs from DB_LOCALE.
The LVARCHAR data type can store character strings of up to 32,739 bytes in a variable-length field. If you specify no maximum size in its declaration, the default upper size limit is 2048 bytes. Data values can include letters, numbers, symbols, whitespace, and unprintable characters.
LVARCHAR is similar to the VARCHAR data type in several ways:
Unlike VARCHAR, however, LVARCHAR has no reserved size parameter, and data strings in LVARCHAR columns can be longer than the VARCHAR limit of 255 bytes.
The database server also uses LVARCHAR to represent the external format of opaque data types. In I/O operations of the database server, LVARCHAR data values have no upper limit on their size, apart from file size restrictions or limits of your operating system or hardware resources.
The TEXT data type stores any kind of text data. TEXT columns typically store memos, manual chapters, business documents, program source files, and other types of textual information. The following list summarizes how the choice of a locale affects the TEXT data type:
The database locale should support the characters that you want to store in TEXT columns. However, you can put any type of character in a TEXT column.
The database server does not build indexes on TEXT columns. Therefore, it does not perform collation tasks on these columns.
The client application performs code-set conversion of TEXT data automatically if CLIENT_LOCALE differs from DB_LOCALE.