|[Overview][Resource strings][Constants][Types][Procedures and functions][Index]||[#rtl]|
Unicode data management
The system unit
The fpwidestring unit relies on having relevant Unicode collation data linked in the binary. The Unicode data is managed using the routines in the unicodedata unit. The FPC project distributes some Unicode collation data in .bco files which can be loaded using the LoadCollation routines. The LoadCollation is the main routine of this unit.
All collation data requires at least the Default Unicode Collation Element Table to be registered (called DUCET). The DUCET encoding is provided by the unicodeducet unit, part of the rtl-Unicode package.
There are two ways to register collations :
The two ways can co-exist: some collations may be compile time included (for example for most used collations) and others can be loaded at runtime in the same application.
The binary collation files are endian sensitive:
Note that the compile time units collation units (collation_lang.pas) include already the unicodeducet.pas (DUCET) unit so it is not necessary to include it manually, contrary to the binary files. So an application that only uses the binary collation files should at least include the unicodeducet unit or manually load the binary collation collation_ducet_le.bco or collation_ducet_be.bco, depending on the endianness of the platform. The LoadCollation call using a directory and the language ducet automatically select the correct file.