Variables: Keys of character properties | |
Key for script. These symbols are used as keys of character properties.
The symbol Mscript has the name
Each symbol that represents a script has one of the names listed in the Unicode Technical Report #24. | |
MSymbol | Mscript |
MSymbol | Mname |
Key for character name. | |
MSymbol | Mcategory |
Key for general category. | |
MSymbol | Mcombining_class |
Key for canonical combining class. | |
MSymbol | Mbidi_category |
Key for bidi category. | |
MSymbol | Msimple_case_folding |
Key for corresponding single lowercase character. | |
MSymbol | Mcomplicated_case_folding |
Key for corresponding multiple lowercase characters. | |
Defines | |
#define | MCHAR_MAX |
Maximum character code. | |
Functions | |
MSymbol | mchar_define_property (const char *name, MSymbol type) |
Define a character property. | |
void * | mchar_get_prop (int c, MSymbol key) |
Get the value of a character property. | |
int | mchar_put_prop (int c, MSymbol key, void *val) |
Set the value of a character property. | |
MCharTable * | mchar_get_prop_table (MSymbol key, MSymbol *type) |
Get the char-table for a character property. |
0
. The maximum character code is defined by the macro MCHAR_MAX. It is assured that MCHAR_MAX is not smaller than 0x3FFFFF
(22 bits).
Characters 0
to 0x10FFFF
are equivalent to the Unicode characters of the same code values.
A character can have zero or more properties called character properties. A character property consists of a key and a value, where key is a symbol and value is anything that can be cast to (void *)
. "The character property that belongs to character C and whose key is K" may be shortened to "the K property of C".
#define MCHAR_MAX |
The macro MCHAR_MAX gives the maximum character code.
The mchar_define_property() function searches the m17n database for a data whose tags are <Mchar_table, type, sym >. Here, sym is a symbol whose name is name. type must be Mstring, Mtext, Msymbol, Minteger, or Mplist.
MERROR_DB
void* mchar_get_prop | ( | int | c, | |
MSymbol | key | |||
) |
The mchar_get_prop() function searches character c for the character property whose key is key.
NULL
.MERROR_SYMBOL
, MERROR_DB
int mchar_put_prop | ( | int | c, | |
MSymbol | key, | |||
void * | val | |||
) |
The mchar_put_prop() function searches character c for the character property whose key is key and assigns val to the value of the found property.
MERROR_SYMBOL
, MERROR_DB
MCharTable* mchar_get_prop_table | ( | MSymbol | key, | |
MSymbol * | type | |||
) |
The mchar_get_prop_table() function returns a char-table that contains the character property whose key is key. If type is not NULL, this function stores the type of the property in the place pointed by type. See mchar_define_property() for types of character property.
The symbol Mname has the name "name"
and is used as the key of a character property. The value of such a property is a C-string representing the name of the character.
The symbol Mcategory has the name "category"
and is used as the key of a character property. The value of such a property is a symbol representing the general category of the character.
Each symbol that represents a general category has one of the names listed as abbreviations for General Category in Unicode.
The symbol Mcombining_class has the name "combining-class"
and is used as the key of a character property. The value of such a property is an integer that represents the canonical combining class of the character.
The meaning of each integer that represents a canonical combining class is identical to the one defined in Unicode.
The symbol Mbidi_category has the name "bidi-category"
and is used as the key of a character property. The value of such a property is a symbol that represents the bidirectional category of the character.
Each symbol that represents a bidirectional category has one of the names listed as types of Bidirectional Category in Unicode.
The symbol Msimple_case_folding has the name "simple-case-folding"
and is used as the key of a character property. The value of such a property is the corresponding single lowercase character that is used when comparing M-texts ignoring cases.
If a character requires a complicated comparison (i.e. cannot be compared by simply mapping to another single character), the value of such a property is 0xFFFF
. In this case, the character has another property whose key is Mcomplicated_case_folding.
The symbol Mcomplicated_case_folding has the name "complicated-case-folding"
and is used as the key of a character property. The value of such a property is the corresponding M-text that contains a sequence of lowercase characters to be used for comparing M-texts ignoring case.