Next: , Previous: , Up: Unicode character classification and properties <unictype.h>   [Contents][Index]


8.11 Scripts

The Unicode characters are subdivided into scripts.

The following type is used to represent a script:

Type: uc_script_t

This data type is a structure type that refers to statically allocated read-only data. It contains the following fields:

const char *name;

The name field contains the name of the script.

The following functions look up a script.

Function: const uc_script_t * uc_script (ucs4_t uc)

Returns the script of a Unicode character. Returns NULL if uc does not belong to any script.

Function: const uc_script_t * uc_script_byname (const char *script_name)

Returns the script given by its name, e.g. "HAN". Returns NULL if a script with the given name does not exist.

The following function views a script as a set of Unicode characters.

Function: bool uc_is_script (ucs4_t uc, const uc_script_t *script)

Tests whether a Unicode character belongs to a given script.

The following gives a global picture of all scripts.

Function: void uc_all_scripts (const uc_script_t **scripts, size_t *count)

Get the list of all scripts. Stores a pointer to an array of all scripts in *scripts and the length of this array in *count.