UltraLite character sets

The results of comparisons on strings, and the sort order of strings, in part depends on the character set, collation, and encoding properties of the database.

Choosing the correct character set, collation, and encoding

Choosing the correct character set, collation, and encoding properties for your database is primarily determined by:

  • The sort order you require. Generally speaking, you should choose the collation that best sorts the characters you intend to store in your database.
  • The platform of your device. Requirements among supported devices can vary, and some require that you use UTF-8 to encode your characters. If you need to support multiple devices, you need to determine whether a database can be shared.
  • If you are synchronizing data, which languages and character sets are supported by the consolidated database. You must ensure that the character sets used in the UltraLite database and the consolidated database are compatible. Otherwise, data could be lost or become altered in unexpected ways if characters in one database's character set do not exist in the other's character set. If you have deployed UltraLite in a multilingual environment, you should also use UTF-8 to encode your UltraLite database.

    When you synchronize, the MobiLink server converts characters as follows:

    1. The UltraLite database characters are converted to Unicode.
    2. The Unicode characters are converted into the consolidated database's character set.
Changing the character set and collation

You cannot change the character set, collation, or encoding properties of the database once UltraLite writes the file. You must recreate the database.

To recreate an UltraLite database with a new collation

  1. Unload the database.

    You can use either the Unload Database Wizard in Sybase Central or the ulunload utility. See UltraLite Unload Database utility (ulunload).

  2. Create a new database with the appropriate collation.

  3. Optional. Convert the data to match the new collation if required.

  4. Reload the database.

    You can use either the Load Database Wizard in Sybase Central or the ulload utility. See UltraLite Load XML to Database utility (ulload).

UltraLite supported collations

Following is the list of supported CHAR collations in UltraLite. This list can also be obtained by running the following command:

ulcreate -l
Collation label Description
1250LATIN2 Code Page 1250, Windows Latin 2, Central/Eastern European
1250POL Code Page 1250, Windows Latin 2, Polish
1251CYR Code Page 1251, Windows Cyrillic
1252LATIN1 Code Page 1252, Windows Latin 1, Western
1252NOR Code Page 1252, Windows Latin 1, Norwegian
1252SPA Code Page 1252, Windows Latin 1, Spanish
1252SWEFIN Code Page 1252, Windows Latin 1, Swedish/Finnish
1253ELL Code Page 1253, Windows Greek, ISO8859-7 with extensions
1254TRK Code Page 1254, Windows Turkish, ISO8859-9 with extensions
1254TRKALT Code Page 1254, Windows Turkish, ISO8859-9 with extensions, I-dot e als I-no-dot
1255HEB Code Page 1255, Windows Hebrew, ISO8859-8 with extensions
1256ARA Code Page 1256, Windows Arabic, ISO8859-6 with extensions
1257LIT Code Page 1257, Windows Baltic Rim, Lithuanian
874THAIBIN Code Page 874, Windows Thai, ISO8859-11, binary ordering
932JPN Code Page 932, Japanese Shift-JIS with Microsoft extensions
936ZHO Code Page 936, Simplified Chinese, PRC GBK
949KOR Code Page 949, Korean KS C 5601-1987 Encoding, Wansung
950ZHO_HK Code Page 950, Traditional Chinese, Big 5 Encoding with HKSCS
950ZHO_TW Code Page 950, Traditional Chinese, Big 5 Encoding
EUC_CHINA Simplified Chinese, GB 2312-80 Encoding
EUC_JAPAN Japanese EUC JIS X 0208-1990 and JIS X 0212-1990 Encoding
EUC_KOREA Code Page 1361, Korean KS C 5601-1992 8-bit Encoding, Johab
EUC_TAIWAN Code Page 964, EUC-TW Encoding
ISO1LATIN1 ISO8859-1, ISO Latin 1, Western, Latin 1 Ordering
ISO9LATIN1 ISO8859-15, ISO Latin 9, Western, Latin 1 Ordering
ISO_1 ISO8859-1, ISO Latin 1, Western
ISO_BINENG Binary ordering, English ISO/ASCII 7-bit letter case mappings
UTF8BIN UTF-8, 8-bit multibyte encoding for Unicode, binary ordering
See also

UltraLite platform requirements for character set encoding