.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA) .\" Copyright (C) 2001-2011 .\" National Institute of Advanced Industrial Science and Technology (AIST) .\" This file is part of the m17n library documentation. .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.2 or .\" any later version published by the Free Software Foundation; with no .\" Invariant Section, no Front-Cover Texts, .\" and no Back-Cover Texts. A copy of the license is included in the .\" appendix entitled "GNU Free Documentation License". .TH "m17nCharacter" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*- .ad l .nh .SH NAME m17nCharacter_\-_Chara \- \- Character objects and API for them\&. .SH SYNOPSIS .br .PP .SS "Macros" .in +1c .ti -1c .RI "#define \fBMCHAR_MAX\fP" .br .RI "Maximum character code\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "MSymbol \fBmchar_define_property\fP (const char *name, MSymbol type)" .br .RI "Define a character property\&. " .ti -1c .RI "void * \fBmchar_get_prop\fP (int c, MSymbol key)" .br .RI "Get the value of a character property\&. " .ti -1c .RI "int \fBmchar_put_prop\fP (int c, MSymbol key, void *val)" .br .RI "Set the value of a character property\&. " .ti -1c .RI "\fBMCharTable\fP * \fBmchar_get_prop_table\fP (MSymbol key, MSymbol *type)" .br .RI "Get the char-table for a character property\&. " .in -1c .SS "Variables: Keys of character properties" These symbols are used as keys of character properties\&. .br .in +1c .ti -1c .RI "MSymbol \fBMscript\fP" .br .RI "Key for script\&. " .ti -1c .RI "MSymbol \fBMname\fP" .br .RI "Key for character name\&. " .ti -1c .RI "MSymbol \fBMcategory\fP" .br .RI "Key for general category\&. " .ti -1c .RI "MSymbol \fBMcombining_class\fP" .br .RI "Key for canonical combining class\&. " .ti -1c .RI "MSymbol \fBMbidi_category\fP" .br .RI "Key for bidi category\&. " .ti -1c .RI "MSymbol \fBMsimple_case_folding\fP" .br .RI "Key for corresponding single lowercase character\&. " .ti -1c .RI "MSymbol \fBMcomplicated_case_folding\fP" .br .RI "Key for corresponding multiple lowercase characters\&. " .ti -1c .RI "MSymbol \fBMcased\fP" .br .RI "Key for values used in case operation\&. " .ti -1c .RI "MSymbol \fBMsoft_dotted\fP" .br .RI "Key for values used in case operation\&. " .ti -1c .RI "MSymbol \fBMcase_mapping\fP" .br .RI "Key for values used in case operation\&. " .ti -1c .RI "MSymbol \fBMblock\fP" .br .RI "Key for script block name\&. " .in -1c .SH "Detailed Description" .PP Character objects and API for them\&. The m17n library represents a \fIcharacter\fP by a character code (an integer)\&. The minimum character code is \fC0\fP\&. The maximum character code is defined by the macro \fBMCHAR_MAX\fP\&. It is assured that \fBMCHAR_MAX\fP is not smaller than \fC0x3FFFFF\fP (22 bits)\&. .PP Characters \fC0\fP to \fC0x10FFFF\fP are equivalent to the Unicode characters of the same code values\&. .PP A character can have zero or more properties called \fIcharacter\fP \fIproperties\fP\&. A character property consists of a \fIkey\fP and a \fIvalue\fP, where key is a symbol and value is anything that can be cast to \fC(void *)\fP\&. 'The character property that belongs to character C and whose key is K' may be shortened to 'the K property of C'\&. .br .PP .br .SH "Macro Definition Documentation" .PP .SS "#define MCHAR_MAX" .PP Maximum character code\&. The macro \fBMCHAR_MAX\fP gives the maximum character code\&. .br .SH "Variable Documentation" .PP .SS "MSymbol Mscript" .PP Key for script\&. The symbol \fBMscript\fP has the name \fC'script'\fP and is used as the key of a character property\&. The value of such a property is a symbol representing the script to which the character belongs\&. .PP Each symbol that represents a script has one of the names listed in the \fIUnicode Technical Report #24\fP\&. .br .SS "MSymbol Mname" .PP Key for character name\&. The symbol \fBMname\fP has the name \fC'name'\fP 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\&. .br .SS "MSymbol Mcategory" .PP Key for general category\&. The symbol \fBMcategory\fP has the name \fC'category'\fP and is used as the key of a character property\&. The value of such a property is a symbol representing the \fIgeneral category\fP of the character\&. .PP Each symbol that represents a general category has one of the names listed as abbreviations for \fIGeneral Category\fP in Unicode\&. .br .SS "MSymbol Mcombining_class" .PP Key for canonical combining class\&. The symbol \fBMcombining_class\fP has the name \fC'combining\-class'\fP and is used as the key of a character property\&. The value of such a property is an integer that represents the \fIcanonical combining class\fP of the character\&. .PP The meaning of each integer that represents a canonical combining class is identical to the one defined in Unicode\&. .br .SS "MSymbol Mbidi_category" .PP Key for bidi category\&. The symbol \fBMbidi_category\fP has the name \fC'bidi\-category'\fP and is used as the key of a character property\&. The value of such a property is a symbol that represents the \fIbidirectional category\fP of the character\&. .PP Each symbol that represents a bidirectional category has one of the names listed as types of \fIBidirectional Category\fP in Unicode\&. .br .SS "MSymbol Msimple_case_folding" .PP Key for corresponding single lowercase character\&. The symbol \fBMsimple_case_folding\fP has the name \fC'simple\-case\-folding'\fP 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\&. .PP 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 \fC0xFFFF\fP\&. In this case, the character has another property whose key is \fBMcomplicated_case_folding\fP\&. .br .SS "MSymbol Mcomplicated_case_folding" .PP Key for corresponding multiple lowercase characters\&. The symbol \fBMcomplicated_case_folding\fP has the name \fC'complicated\-case\-folding'\fP 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\&. .br .SS "MSymbol Mcased" .PP Key for values used in case operation\&. The symbol \fBMcased\fP has the name \fC'cased'\fP and is used as the key of charater property\&. The value of such a property is an integer value 1, 2, or 3 representing 'cased', 'case\-ignorable', and both of them respective\&. See the Unicode Standard 5\&.0 (Section 3\&.13 Default Case Algorithm) for the detail\&. .SS "MSymbol Msoft_dotted" .PP Key for values used in case operation\&. The symbol \fBMsoft_dotted\fP has the name \fC'soft\-dotted'\fP and is used as the key of charater property\&. The value of such a property is \fBMt\fP if a character has 'Soft_Dotted' property, and \fBMnil\fP otherwise\&. See the Unicode Standard 5\&.0 (Section 3\&.13 Default Case Algorithm) for the detail\&. .br .SS "MSymbol Mcase_mapping" .PP Key for values used in case operation\&. The symbol \fBMcase_mapping\fP has the name \fC'case\-mapping'\fP and is used as the key of charater property\&. The value of such a property is a plist of three M\-Texts; lower, title, and upper of the corresponding character\&. See the Unicode Standard 5\&.0 (Section 5\&.18 Case Mappings) for the detail\&. .br .SS "MSymbol Mblock" .PP Key for script block name\&. The symbol \fBMblock\fP the name \fC'block'\fP and is used as the key of charater property\&. The value of such a property is a symbol representing a script block of the corresponding character\&. .br .SH "Author" .PP Generated automatically by Doxygen for The m17n Library from the source code\&. .SH COPYRIGHT Copyright (C) 2001 Information\-technology Promotion Agency (IPA) .br Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST) .br Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License .