SQL data type for localizable fields

Consider the following if you know that a certain data field might contain localized data:

  • MS SQL Server:
    Microsoft's SQL Server does not offer a UTF-8 codepage. Regular data types such as VARCHAR, CHAR or TEXT use single byte code pages (such as MS Windows 1252) or double-byte code pages (such as Shift-JIS), but they cannot hold characters out of multiple regions.
    For example, Shift-JIS allows you to store English and Japanese characters, but not Cyrillic or Portuguese characters. On the other hand, MS WIN 1251 allows you to store Cyrillic characters but not Japanese.
    If you have the requirement to store special characters from many different languages, you should use the SQL Server data types NVARCHAR, NCHAR, or NTEXT instead of VARCHAR, CHAR or TEXT. These data types use UTF-16 as a codepage and therefore are capable of storing special characters from many different languages. Be careful to use these data types only for fields that should be localized, and not for fields that will only use English characters, as they take up twice as much storage space. Also, MS SQL Server has a limitation of 8060 bytes per row in a single table.
  • Oracle and DB2:
    If you want to store localized data in either DB2 or Oracle, set up your database to use UTF-8 as the codepage. Service Manager internally uses UTF-8 as the code page and sends data to the RDBMS clients in UTF-8. By using UTF-8 as the database server's code page, code page translations are not necessary, and VARCHAR, CHAR and CLOB data type can still hold all special characters from all languages.

Related topics

Database dictionary
Database dictionary data types

Create an active database dictionary record
Import RDBMS columns into an existing database dictionary record

Database dictionary data types