mkcldr

Convert CLDR text file to binary data for libqdb_cldr.so

Syntax:

mkcldr [options]* input file output file

Runs on:

QNX Neutrino

Options:

-c
Name of the CHARMAP file (typically posix/UTF-8.cm from CLDR).
-i
Secondary weight/flag for case inversion (default 0x0080).
-n
Override name of collation in output file header.
-w
Set variable weight threshold for ignorables (punctuation).

Description:

The mkcldr utility converts standard CLDR language collation (or sort order) tables into a format usable by the libqdb_cldr.so DLL. Specifically, it reads the contents of a text input file in the CLDR (Common Locale Data Repository) POSIX format and writes this content to an output file as binary data suitable for libqdb_cldr.so.

To use other language collation tables, you can download them from cldr.unicode.org, then use mkcldr to convert them.

If the collation rules in the files shipped with the OS or in the downloaded files don't correspond to the rules required for your locale or implementation, you can adjust them, then use mkcldr to create the files with the binary data format required by libqdb_cldr.so.

Note that mkcldr functions only and specifically with qdb, and is used to provide a sqlite collation order for infotainment and multimedia databases (SELECT, ORDER BY, and COLLATE queries of a song or artist, for example). It produces a private, packed format that stores just the sorting aspects of CLDR/ICU and makes it available to qdb as a DLL. For more information, see the QNX Database Developer's Guide.

Examples:

The following example converts the file for German used in Switzerland:

$ cd cldr-1.4.1/posix
$ mkcldr -c UTF-8.cm de_CH.UTF-8.src /etc/cldr/de_CH
Note: The UTF-8.cm file is simply a database that maps textual character descriptions to their Unicode value; it is used in parsing the collation information.