sl@0: /* sl@0: ********************************************************************** sl@0: * Copyright (C) 1997-2005, International Business Machines sl@0: * Corporation and others. All Rights Reserved. sl@0: ********************************************************************** sl@0: * sl@0: * File UCHAR.H sl@0: * sl@0: * Modification History: sl@0: * sl@0: * Date Name Description sl@0: * 04/02/97 aliu Creation. sl@0: * 03/29/99 helena Updated for C APIs. sl@0: * 4/15/99 Madhu Updated for C Implementation and Javadoc sl@0: * 5/20/99 Madhu Added the function u_getVersion() sl@0: * 8/19/1999 srl Upgraded scripts to Unicode 3.0 sl@0: * 8/27/1999 schererm UCharDirection constants: U_... sl@0: * 11/11/1999 weiv added u_isalnum(), cleaned comments sl@0: * 01/11/2000 helena Renamed u_getVersion to u_getUnicodeVersion(). sl@0: ****************************************************************************** sl@0: */ sl@0: sl@0: #ifndef UCHAR_H sl@0: #define UCHAR_H sl@0: sl@0: #include "unicode/utypes.h" sl@0: sl@0: U_CDECL_BEGIN sl@0: sl@0: /*==========================================================================*/ sl@0: /* Unicode version number */ sl@0: /*==========================================================================*/ sl@0: /** sl@0: * Unicode version number, default for the current ICU version. sl@0: * The actual Unicode Character Database (UCD) data is stored in uprops.dat sl@0: * and may be generated from UCD files from a different Unicode version. sl@0: * Call u_getUnicodeVersion to get the actual Unicode version of the data. sl@0: * sl@0: * @see u_getUnicodeVersion sl@0: * @stable ICU 2.0 sl@0: */ sl@0: #define U_UNICODE_VERSION "4.1" sl@0: sl@0: /** sl@0: * \file sl@0: * \brief C API: Unicode Properties sl@0: * sl@0: * This C API provides low-level access to the Unicode Character Database. sl@0: * In addition to raw property values, some convenience functions calculate sl@0: * derived properties, for example for Java-style programming. sl@0: * sl@0: * Unicode assigns each code point (not just assigned character) values for sl@0: * many properties. sl@0: * Most of them are simple boolean flags, or constants from a small enumerated list. sl@0: * For some properties, values are strings or other relatively more complex types. sl@0: * sl@0: * For more information see sl@0: * "About the Unicode Character Database" (http://www.unicode.org/ucd/) sl@0: * and the ICU User Guide chapter on Properties (http://icu.sourceforge.net/userguide/properties.html). sl@0: * sl@0: * Many functions are designed to match java.lang.Character functions. sl@0: * See the individual function documentation, sl@0: * and see the JDK 1.4 java.lang.Character documentation sl@0: * at http://java.sun.com/j2se/1.4/docs/api/java/lang/Character.html sl@0: * sl@0: * There are also functions that provide easy migration from C/POSIX functions sl@0: * like isblank(). Their use is generally discouraged because the C/POSIX sl@0: * standards do not define their semantics beyond the ASCII range, which means sl@0: * that different implementations exhibit very different behavior. sl@0: * Instead, Unicode properties should be used directly. sl@0: * sl@0: * There are also only a few, broad C/POSIX character classes, and they tend sl@0: * to be used for conflicting purposes. For example, the "isalpha()" class sl@0: * is sometimes used to determine word boundaries, while a more sophisticated sl@0: * approach would at least distinguish initial letters from continuation sl@0: * characters (the latter including combining marks). sl@0: * (In ICU, BreakIterator is the most sophisticated API for word boundaries.) sl@0: * Another example: There is no "istitle()" class for titlecase characters. sl@0: * sl@0: * ICU 3.4 and later provides API access for all twelve C/POSIX character classes. sl@0: * ICU implements them according to the Standard Recommendations in sl@0: * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions sl@0: * (http://www.unicode.org/reports/tr18/#Compatibility_Properties). sl@0: * sl@0: * API access for C/POSIX character classes is as follows: sl@0: * - alpha: u_isUAlphabetic(c) or u_hasBinaryProperty(c, UCHAR_ALPHABETIC) sl@0: * - lower: u_isULowercase(c) or u_hasBinaryProperty(c, UCHAR_LOWERCASE) sl@0: * - upper: u_isUUppercase(c) or u_hasBinaryProperty(c, UCHAR_UPPERCASE) sl@0: * - punct: u_ispunct(c) sl@0: * - digit: u_isdigit(c) or u_charType(c)==U_DECIMAL_DIGIT_NUMBER sl@0: * - xdigit: u_isxdigit(c) or u_hasBinaryProperty(c, UCHAR_POSIX_XDIGIT) sl@0: * - alnum: u_hasBinaryProperty(c, UCHAR_POSIX_ALNUM) sl@0: * - space: u_isUWhiteSpace(c) or u_hasBinaryProperty(c, UCHAR_WHITE_SPACE) sl@0: * - blank: u_isblank(c) or u_hasBinaryProperty(c, UCHAR_POSIX_BLANK) sl@0: * - cntrl: u_charType(c)==U_CONTROL_CHAR sl@0: * - graph: u_hasBinaryProperty(c, UCHAR_POSIX_GRAPH) sl@0: * - print: u_hasBinaryProperty(c, UCHAR_POSIX_PRINT) sl@0: * sl@0: * Note: Some of the u_isxyz() functions in uchar.h predate, and do not match, sl@0: * the Standard Recommendations in UTS #18. Instead, they match Java sl@0: * functions according to their API documentation. sl@0: * sl@0: * \htmlonly sl@0: * The C/POSIX character classes are also available in UnicodeSet patterns, sl@0: * using patterns like [:graph:] or \p{graph}. sl@0: * \endhtmlonly sl@0: * sl@0: * Note: There are several ICU whitespace functions. sl@0: * Comparison: sl@0: * - u_isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property; sl@0: * most of general categories "Z" (separators) + most whitespace ISO controls sl@0: * (including no-break spaces, but excluding IS1..IS4 and ZWSP) sl@0: * - u_isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces sl@0: * - u_isJavaSpaceChar: Java isSpaceChar; just Z (including no-break spaces) sl@0: * - u_isspace: Z + whitespace ISO controls (including no-break spaces) sl@0: * - u_isblank: "horizontal spaces" = TAB + Zs - ZWSP sl@0: */ sl@0: sl@0: /** sl@0: * Constants. sl@0: */ sl@0: sl@0: /** The lowest Unicode code point value. Code points are non-negative. @stable ICU 2.0 */ sl@0: #define UCHAR_MIN_VALUE 0 sl@0: sl@0: /** sl@0: * The highest Unicode code point value (scalar value) according to sl@0: * The Unicode Standard. This is a 21-bit value (20.1 bits, rounded up). sl@0: * For a single character, UChar32 is a simple type that can hold any code point value. sl@0: * sl@0: * @see UChar32 sl@0: * @stable ICU 2.0 sl@0: */ sl@0: #define UCHAR_MAX_VALUE 0x10ffff sl@0: sl@0: /** sl@0: * Get a single-bit bit set (a flag) from a bit number 0..31. sl@0: * @stable ICU 2.1 sl@0: */ sl@0: #define U_MASK(x) ((uint32_t)1<<(x)) sl@0: sl@0: /* sl@0: * !! Note: Several comments in this file are machine-read by the sl@0: * genpname tool. These comments describe the correspondence between sl@0: * icu enum constants and UCD entities. Do not delete them. Update sl@0: * these comments as needed. sl@0: * sl@0: * Any comment of the form "/ *[name]* /" (spaces added) is such sl@0: * a comment. sl@0: * sl@0: * The U_JG_* and U_GC_*_MASK constants are matched by their symbolic sl@0: * name, which must match PropertyValueAliases.txt. sl@0: */ sl@0: sl@0: /** sl@0: * Selection constants for Unicode properties. sl@0: * These constants are used in functions like u_hasBinaryProperty to select sl@0: * one of the Unicode properties. sl@0: * sl@0: * The properties APIs are intended to reflect Unicode properties as defined sl@0: * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). sl@0: * For details about the properties see http://www.unicode.org/ucd/ . sl@0: * For names of Unicode properties see the UCD file PropertyAliases.txt. sl@0: * sl@0: * Important: If ICU is built with UCD files from Unicode versions below, e.g., 3.2, sl@0: * then properties marked with "new in Unicode 3.2" are not or not fully available. sl@0: * Check u_getUnicodeVersion to be sure. sl@0: * sl@0: * @see u_hasBinaryProperty sl@0: * @see u_getIntPropertyValue sl@0: * @see u_getUnicodeVersion sl@0: * @stable ICU 2.1 sl@0: */ sl@0: typedef enum UProperty { sl@0: /* See note !!. Comments of the form "Binary property Dash", sl@0: "Enumerated property Script", "Double property Numeric_Value", sl@0: and "String property Age" are read by genpname. */ sl@0: sl@0: /* Note: Place UCHAR_ALPHABETIC before UCHAR_BINARY_START so that sl@0: debuggers display UCHAR_ALPHABETIC as the symbolic name for 0, sl@0: rather than UCHAR_BINARY_START. Likewise for other *_START sl@0: identifiers. */ sl@0: sl@0: /** Binary property Alphabetic. Same as u_isUAlphabetic, different from u_isalpha. sl@0: Lu+Ll+Lt+Lm+Lo+Nl+Other_Alphabetic @stable ICU 2.1 */ sl@0: UCHAR_ALPHABETIC=0, sl@0: /** First constant for binary Unicode properties. @stable ICU 2.1 */ sl@0: UCHAR_BINARY_START=UCHAR_ALPHABETIC, sl@0: /** Binary property ASCII_Hex_Digit. 0-9 A-F a-f @stable ICU 2.1 */ sl@0: UCHAR_ASCII_HEX_DIGIT, sl@0: /** Binary property Bidi_Control. sl@0: Format controls which have specific functions sl@0: in the Bidi Algorithm. @stable ICU 2.1 */ sl@0: UCHAR_BIDI_CONTROL, sl@0: /** Binary property Bidi_Mirrored. sl@0: Characters that may change display in RTL text. sl@0: Same as u_isMirrored. sl@0: See Bidi Algorithm, UTR 9. @stable ICU 2.1 */ sl@0: UCHAR_BIDI_MIRRORED, sl@0: /** Binary property Dash. Variations of dashes. @stable ICU 2.1 */ sl@0: UCHAR_DASH, sl@0: /** Binary property Default_Ignorable_Code_Point (new in Unicode 3.2). sl@0: Ignorable in most processing. sl@0: <2060..206F, FFF0..FFFB, E0000..E0FFF>+Other_Default_Ignorable_Code_Point+(Cf+Cc+Cs-White_Space) @stable ICU 2.1 */ sl@0: UCHAR_DEFAULT_IGNORABLE_CODE_POINT, sl@0: /** Binary property Deprecated (new in Unicode 3.2). sl@0: The usage of deprecated characters is strongly discouraged. @stable ICU 2.1 */ sl@0: UCHAR_DEPRECATED, sl@0: /** Binary property Diacritic. Characters that linguistically modify sl@0: the meaning of another character to which they apply. @stable ICU 2.1 */ sl@0: UCHAR_DIACRITIC, sl@0: /** Binary property Extender. sl@0: Extend the value or shape of a preceding alphabetic character, sl@0: e.g., length and iteration marks. @stable ICU 2.1 */ sl@0: UCHAR_EXTENDER, sl@0: /** Binary property Full_Composition_Exclusion. sl@0: CompositionExclusions.txt+Singleton Decompositions+ sl@0: Non-Starter Decompositions. @stable ICU 2.1 */ sl@0: UCHAR_FULL_COMPOSITION_EXCLUSION, sl@0: /** Binary property Grapheme_Base (new in Unicode 3.2). sl@0: For programmatic determination of grapheme cluster boundaries. sl@0: [0..10FFFF]-Cc-Cf-Cs-Co-Cn-Zl-Zp-Grapheme_Link-Grapheme_Extend-CGJ @stable ICU 2.1 */ sl@0: UCHAR_GRAPHEME_BASE, sl@0: /** Binary property Grapheme_Extend (new in Unicode 3.2). sl@0: For programmatic determination of grapheme cluster boundaries. sl@0: Me+Mn+Mc+Other_Grapheme_Extend-Grapheme_Link-CGJ @stable ICU 2.1 */ sl@0: UCHAR_GRAPHEME_EXTEND, sl@0: /** Binary property Grapheme_Link (new in Unicode 3.2). sl@0: For programmatic determination of grapheme cluster boundaries. @stable ICU 2.1 */ sl@0: UCHAR_GRAPHEME_LINK, sl@0: /** Binary property Hex_Digit. sl@0: Characters commonly used for hexadecimal numbers. @stable ICU 2.1 */ sl@0: UCHAR_HEX_DIGIT, sl@0: /** Binary property Hyphen. Dashes used to mark connections sl@0: between pieces of words, plus the Katakana middle dot. @stable ICU 2.1 */ sl@0: UCHAR_HYPHEN, sl@0: /** Binary property ID_Continue. sl@0: Characters that can continue an identifier. sl@0: DerivedCoreProperties.txt also says "NOTE: Cf characters should be filtered out." sl@0: ID_Start+Mn+Mc+Nd+Pc @stable ICU 2.1 */ sl@0: UCHAR_ID_CONTINUE, sl@0: /** Binary property ID_Start. sl@0: Characters that can start an identifier. sl@0: Lu+Ll+Lt+Lm+Lo+Nl @stable ICU 2.1 */ sl@0: UCHAR_ID_START, sl@0: /** Binary property Ideographic. sl@0: CJKV ideographs. @stable ICU 2.1 */ sl@0: UCHAR_IDEOGRAPHIC, sl@0: /** Binary property IDS_Binary_Operator (new in Unicode 3.2). sl@0: For programmatic determination of sl@0: Ideographic Description Sequences. @stable ICU 2.1 */ sl@0: UCHAR_IDS_BINARY_OPERATOR, sl@0: /** Binary property IDS_Trinary_Operator (new in Unicode 3.2). sl@0: For programmatic determination of sl@0: Ideographic Description Sequences. @stable ICU 2.1 */ sl@0: UCHAR_IDS_TRINARY_OPERATOR, sl@0: /** Binary property Join_Control. sl@0: Format controls for cursive joining and ligation. @stable ICU 2.1 */ sl@0: UCHAR_JOIN_CONTROL, sl@0: /** Binary property Logical_Order_Exception (new in Unicode 3.2). sl@0: Characters that do not use logical order and sl@0: require special handling in most processing. @stable ICU 2.1 */ sl@0: UCHAR_LOGICAL_ORDER_EXCEPTION, sl@0: /** Binary property Lowercase. Same as u_isULowercase, different from u_islower. sl@0: Ll+Other_Lowercase @stable ICU 2.1 */ sl@0: UCHAR_LOWERCASE, sl@0: /** Binary property Math. Sm+Other_Math @stable ICU 2.1 */ sl@0: UCHAR_MATH, sl@0: /** Binary property Noncharacter_Code_Point. sl@0: Code points that are explicitly defined as illegal sl@0: for the encoding of characters. @stable ICU 2.1 */ sl@0: UCHAR_NONCHARACTER_CODE_POINT, sl@0: /** Binary property Quotation_Mark. @stable ICU 2.1 */ sl@0: UCHAR_QUOTATION_MARK, sl@0: /** Binary property Radical (new in Unicode 3.2). sl@0: For programmatic determination of sl@0: Ideographic Description Sequences. @stable ICU 2.1 */ sl@0: UCHAR_RADICAL, sl@0: /** Binary property Soft_Dotted (new in Unicode 3.2). sl@0: Characters with a "soft dot", like i or j. sl@0: An accent placed on these characters causes sl@0: the dot to disappear. @stable ICU 2.1 */ sl@0: UCHAR_SOFT_DOTTED, sl@0: /** Binary property Terminal_Punctuation. sl@0: Punctuation characters that generally mark sl@0: the end of textual units. @stable ICU 2.1 */ sl@0: UCHAR_TERMINAL_PUNCTUATION, sl@0: /** Binary property Unified_Ideograph (new in Unicode 3.2). sl@0: For programmatic determination of sl@0: Ideographic Description Sequences. @stable ICU 2.1 */ sl@0: UCHAR_UNIFIED_IDEOGRAPH, sl@0: /** Binary property Uppercase. Same as u_isUUppercase, different from u_isupper. sl@0: Lu+Other_Uppercase @stable ICU 2.1 */ sl@0: UCHAR_UPPERCASE, sl@0: /** Binary property White_Space. sl@0: Same as u_isUWhiteSpace, different from u_isspace and u_isWhitespace. sl@0: Space characters+TAB+CR+LF-ZWSP-ZWNBSP @stable ICU 2.1 */ sl@0: UCHAR_WHITE_SPACE, sl@0: /** Binary property XID_Continue. sl@0: ID_Continue modified to allow closure under sl@0: normalization forms NFKC and NFKD. @stable ICU 2.1 */ sl@0: UCHAR_XID_CONTINUE, sl@0: /** Binary property XID_Start. ID_Start modified to allow sl@0: closure under normalization forms NFKC and NFKD. @stable ICU 2.1 */ sl@0: UCHAR_XID_START, sl@0: /** Binary property Case_Sensitive. Either the source of a case sl@0: mapping or _in_ the target of a case mapping. Not the same as sl@0: the general category Cased_Letter. @stable ICU 2.6 */ sl@0: UCHAR_CASE_SENSITIVE, sl@0: /** Binary property STerm (new in Unicode 4.0.1). sl@0: Sentence Terminal. Used in UAX #29: Text Boundaries sl@0: (http://www.unicode.org/reports/tr29/) sl@0: @draft ICU 3.0 */ sl@0: UCHAR_S_TERM, sl@0: /** Binary property Variation_Selector (new in Unicode 4.0.1). sl@0: Indicates all those characters that qualify as Variation Selectors. sl@0: For details on the behavior of these characters, sl@0: see StandardizedVariants.html and 15.6 Variation Selectors. sl@0: @draft ICU 3.0 */ sl@0: UCHAR_VARIATION_SELECTOR, sl@0: /** Binary property NFD_Inert. sl@0: ICU-specific property for characters that are inert under NFD, sl@0: i.e., they do not interact with adjacent characters. sl@0: Used for example in normalizing transforms in incremental mode sl@0: to find the boundary of safely normalizable text despite possible sl@0: text additions. sl@0: sl@0: There is one such property per normalization form. sl@0: These properties are computed as follows - an inert character is: sl@0: a) unassigned, or ALL of the following: sl@0: b) of combining class 0. sl@0: c) not decomposed by this normalization form. sl@0: AND if NFC or NFKC, sl@0: d) can never compose with a previous character. sl@0: e) can never compose with a following character. sl@0: f) can never change if another character is added. sl@0: Example: a-breve might satisfy all but f, but if you sl@0: add an ogonek it changes to a-ogonek + breve sl@0: sl@0: See also com.ibm.text.UCD.NFSkippable in the ICU4J repository, sl@0: and icu/source/common/unormimp.h . sl@0: @draft ICU 3.0 */ sl@0: UCHAR_NFD_INERT, sl@0: /** Binary property NFKD_Inert. sl@0: ICU-specific property for characters that are inert under NFKD, sl@0: i.e., they do not interact with adjacent characters. sl@0: Used for example in normalizing transforms in incremental mode sl@0: to find the boundary of safely normalizable text despite possible sl@0: text additions. sl@0: @see UCHAR_NFD_INERT sl@0: @draft ICU 3.0 */ sl@0: UCHAR_NFKD_INERT, sl@0: /** Binary property NFC_Inert. sl@0: ICU-specific property for characters that are inert under NFC, sl@0: i.e., they do not interact with adjacent characters. sl@0: Used for example in normalizing transforms in incremental mode sl@0: to find the boundary of safely normalizable text despite possible sl@0: text additions. sl@0: @see UCHAR_NFD_INERT sl@0: @draft ICU 3.0 */ sl@0: UCHAR_NFC_INERT, sl@0: /** Binary property NFKC_Inert. sl@0: ICU-specific property for characters that are inert under NFKC, sl@0: i.e., they do not interact with adjacent characters. sl@0: Used for example in normalizing transforms in incremental mode sl@0: to find the boundary of safely normalizable text despite possible sl@0: text additions. sl@0: @see UCHAR_NFD_INERT sl@0: @draft ICU 3.0 */ sl@0: UCHAR_NFKC_INERT, sl@0: /** Binary Property Segment_Starter. sl@0: ICU-specific property for characters that are starters in terms of sl@0: Unicode normalization and combining character sequences. sl@0: They have ccc=0 and do not occur in non-initial position of the sl@0: canonical decomposition of any character sl@0: (like " in NFD(a-umlaut) and a Jamo T in an NFD(Hangul LVT)). sl@0: ICU uses this property for segmenting a string for generating a set of sl@0: canonically equivalent strings, e.g. for canonical closure while sl@0: processing collation tailoring rules. sl@0: @draft ICU 3.0 */ sl@0: UCHAR_SEGMENT_STARTER, sl@0: /** Binary property Pattern_Syntax (new in Unicode 4.1). sl@0: See UAX #31 Identifier and Pattern Syntax sl@0: (http://www.unicode.org/reports/tr31/) sl@0: @draft ICU 3.4 */ sl@0: UCHAR_PATTERN_SYNTAX, sl@0: /** Binary property Pattern_White_Space (new in Unicode 4.1). sl@0: See UAX #31 Identifier and Pattern Syntax sl@0: (http://www.unicode.org/reports/tr31/) sl@0: @draft ICU 3.4 */ sl@0: UCHAR_PATTERN_WHITE_SPACE, sl@0: /** Binary property alnum (a C/POSIX character class). sl@0: Implemented according to the UTS #18 Annex C Standard Recommendation. sl@0: See the uchar.h file documentation. sl@0: @draft ICU 3.4 */ sl@0: UCHAR_POSIX_ALNUM, sl@0: /** Binary property blank (a C/POSIX character class). sl@0: Implemented according to the UTS #18 Annex C Standard Recommendation. sl@0: See the uchar.h file documentation. sl@0: @draft ICU 3.4 */ sl@0: UCHAR_POSIX_BLANK, sl@0: /** Binary property graph (a C/POSIX character class). sl@0: Implemented according to the UTS #18 Annex C Standard Recommendation. sl@0: See the uchar.h file documentation. sl@0: @draft ICU 3.4 */ sl@0: UCHAR_POSIX_GRAPH, sl@0: /** Binary property print (a C/POSIX character class). sl@0: Implemented according to the UTS #18 Annex C Standard Recommendation. sl@0: See the uchar.h file documentation. sl@0: @draft ICU 3.4 */ sl@0: UCHAR_POSIX_PRINT, sl@0: /** Binary property xdigit (a C/POSIX character class). sl@0: Implemented according to the UTS #18 Annex C Standard Recommendation. sl@0: See the uchar.h file documentation. sl@0: @draft ICU 3.4 */ sl@0: UCHAR_POSIX_XDIGIT, sl@0: /** One more than the last constant for binary Unicode properties. @stable ICU 2.1 */ sl@0: UCHAR_BINARY_LIMIT, sl@0: sl@0: /** Enumerated property Bidi_Class. sl@0: Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */ sl@0: UCHAR_BIDI_CLASS=0x1000, sl@0: /** First constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ sl@0: UCHAR_INT_START=UCHAR_BIDI_CLASS, sl@0: /** Enumerated property Block. sl@0: Same as ublock_getCode, returns UBlockCode values. @stable ICU 2.2 */ sl@0: UCHAR_BLOCK, sl@0: /** Enumerated property Canonical_Combining_Class. sl@0: Same as u_getCombiningClass, returns 8-bit numeric values. @stable ICU 2.2 */ sl@0: UCHAR_CANONICAL_COMBINING_CLASS, sl@0: /** Enumerated property Decomposition_Type. sl@0: Returns UDecompositionType values. @stable ICU 2.2 */ sl@0: UCHAR_DECOMPOSITION_TYPE, sl@0: /** Enumerated property East_Asian_Width. sl@0: See http://www.unicode.org/reports/tr11/ sl@0: Returns UEastAsianWidth values. @stable ICU 2.2 */ sl@0: UCHAR_EAST_ASIAN_WIDTH, sl@0: /** Enumerated property General_Category. sl@0: Same as u_charType, returns UCharCategory values. @stable ICU 2.2 */ sl@0: UCHAR_GENERAL_CATEGORY, sl@0: /** Enumerated property Joining_Group. sl@0: Returns UJoiningGroup values. @stable ICU 2.2 */ sl@0: UCHAR_JOINING_GROUP, sl@0: /** Enumerated property Joining_Type. sl@0: Returns UJoiningType values. @stable ICU 2.2 */ sl@0: UCHAR_JOINING_TYPE, sl@0: /** Enumerated property Line_Break. sl@0: Returns ULineBreak values. @stable ICU 2.2 */ sl@0: UCHAR_LINE_BREAK, sl@0: /** Enumerated property Numeric_Type. sl@0: Returns UNumericType values. @stable ICU 2.2 */ sl@0: UCHAR_NUMERIC_TYPE, sl@0: /** Enumerated property Script. sl@0: Same as uscript_getScript, returns UScriptCode values. @stable ICU 2.2 */ sl@0: UCHAR_SCRIPT, sl@0: /** Enumerated property Hangul_Syllable_Type, new in Unicode 4. sl@0: Returns UHangulSyllableType values. @stable ICU 2.6 */ sl@0: UCHAR_HANGUL_SYLLABLE_TYPE, sl@0: /** Enumerated property NFD_Quick_Check. sl@0: Returns UNormalizationCheckResult values. @draft ICU 3.0 */ sl@0: UCHAR_NFD_QUICK_CHECK, sl@0: /** Enumerated property NFKD_Quick_Check. sl@0: Returns UNormalizationCheckResult values. @draft ICU 3.0 */ sl@0: UCHAR_NFKD_QUICK_CHECK, sl@0: /** Enumerated property NFC_Quick_Check. sl@0: Returns UNormalizationCheckResult values. @draft ICU 3.0 */ sl@0: UCHAR_NFC_QUICK_CHECK, sl@0: /** Enumerated property NFKC_Quick_Check. sl@0: Returns UNormalizationCheckResult values. @draft ICU 3.0 */ sl@0: UCHAR_NFKC_QUICK_CHECK, sl@0: /** Enumerated property Lead_Canonical_Combining_Class. sl@0: ICU-specific property for the ccc of the first code point sl@0: of the decomposition, or lccc(c)=ccc(NFD(c)[0]). sl@0: Useful for checking for canonically ordered text; sl@0: see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . sl@0: Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @draft ICU 3.0 */ sl@0: UCHAR_LEAD_CANONICAL_COMBINING_CLASS, sl@0: /** Enumerated property Trail_Canonical_Combining_Class. sl@0: ICU-specific property for the ccc of the last code point sl@0: of the decomposition, or tccc(c)=ccc(NFD(c)[last]). sl@0: Useful for checking for canonically ordered text; sl@0: see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . sl@0: Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @draft ICU 3.0 */ sl@0: UCHAR_TRAIL_CANONICAL_COMBINING_CLASS, sl@0: /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). sl@0: Used in UAX #29: Text Boundaries sl@0: (http://www.unicode.org/reports/tr29/) sl@0: Returns UGraphemeClusterBreak values. @draft ICU 3.4 */ sl@0: UCHAR_GRAPHEME_CLUSTER_BREAK, sl@0: /** Enumerated property Sentence_Break (new in Unicode 4.1). sl@0: Used in UAX #29: Text Boundaries sl@0: (http://www.unicode.org/reports/tr29/) sl@0: Returns USentenceBreak values. @draft ICU 3.4 */ sl@0: UCHAR_SENTENCE_BREAK, sl@0: /** Enumerated property Word_Break (new in Unicode 4.1). sl@0: Used in UAX #29: Text Boundaries sl@0: (http://www.unicode.org/reports/tr29/) sl@0: Returns UWordBreakValues values. @draft ICU 3.4 */ sl@0: UCHAR_WORD_BREAK, sl@0: /** One more than the last constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ sl@0: UCHAR_INT_LIMIT, sl@0: sl@0: /** Bitmask property General_Category_Mask. sl@0: This is the General_Category property returned as a bit mask. sl@0: When used in u_getIntPropertyValue(c), same as U_MASK(u_charType(c)), sl@0: returns bit masks for UCharCategory values where exactly one bit is set. sl@0: When used with u_getPropertyValueName() and u_getPropertyValueEnum(), sl@0: a multi-bit mask is used for sets of categories like "Letters". sl@0: Mask values should be cast to uint32_t. sl@0: @stable ICU 2.4 */ sl@0: UCHAR_GENERAL_CATEGORY_MASK=0x2000, sl@0: /** First constant for bit-mask Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_MASK_START=UCHAR_GENERAL_CATEGORY_MASK, sl@0: /** One more than the last constant for bit-mask Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_MASK_LIMIT, sl@0: sl@0: /** Double property Numeric_Value. sl@0: Corresponds to u_getNumericValue. @stable ICU 2.4 */ sl@0: UCHAR_NUMERIC_VALUE=0x3000, sl@0: /** First constant for double Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_DOUBLE_START=UCHAR_NUMERIC_VALUE, sl@0: /** One more than the last constant for double Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_DOUBLE_LIMIT, sl@0: sl@0: /** String property Age. sl@0: Corresponds to u_charAge. @stable ICU 2.4 */ sl@0: UCHAR_AGE=0x4000, sl@0: /** First constant for string Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_STRING_START=UCHAR_AGE, sl@0: /** String property Bidi_Mirroring_Glyph. sl@0: Corresponds to u_charMirror. @stable ICU 2.4 */ sl@0: UCHAR_BIDI_MIRRORING_GLYPH, sl@0: /** String property Case_Folding. sl@0: Corresponds to u_strFoldCase in ustring.h. @stable ICU 2.4 */ sl@0: UCHAR_CASE_FOLDING, sl@0: /** String property ISO_Comment. sl@0: Corresponds to u_getISOComment. @stable ICU 2.4 */ sl@0: UCHAR_ISO_COMMENT, sl@0: /** String property Lowercase_Mapping. sl@0: Corresponds to u_strToLower in ustring.h. @stable ICU 2.4 */ sl@0: UCHAR_LOWERCASE_MAPPING, sl@0: /** String property Name. sl@0: Corresponds to u_charName. @stable ICU 2.4 */ sl@0: UCHAR_NAME, sl@0: /** String property Simple_Case_Folding. sl@0: Corresponds to u_foldCase. @stable ICU 2.4 */ sl@0: UCHAR_SIMPLE_CASE_FOLDING, sl@0: /** String property Simple_Lowercase_Mapping. sl@0: Corresponds to u_tolower. @stable ICU 2.4 */ sl@0: UCHAR_SIMPLE_LOWERCASE_MAPPING, sl@0: /** String property Simple_Titlecase_Mapping. sl@0: Corresponds to u_totitle. @stable ICU 2.4 */ sl@0: UCHAR_SIMPLE_TITLECASE_MAPPING, sl@0: /** String property Simple_Uppercase_Mapping. sl@0: Corresponds to u_toupper. @stable ICU 2.4 */ sl@0: UCHAR_SIMPLE_UPPERCASE_MAPPING, sl@0: /** String property Titlecase_Mapping. sl@0: Corresponds to u_strToTitle in ustring.h. @stable ICU 2.4 */ sl@0: UCHAR_TITLECASE_MAPPING, sl@0: /** String property Unicode_1_Name. sl@0: Corresponds to u_charName. @stable ICU 2.4 */ sl@0: UCHAR_UNICODE_1_NAME, sl@0: /** String property Uppercase_Mapping. sl@0: Corresponds to u_strToUpper in ustring.h. @stable ICU 2.4 */ sl@0: UCHAR_UPPERCASE_MAPPING, sl@0: /** One more than the last constant for string Unicode properties. @stable ICU 2.4 */ sl@0: UCHAR_STRING_LIMIT, sl@0: sl@0: /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ sl@0: UCHAR_INVALID_CODE = -1 sl@0: } UProperty; sl@0: sl@0: /** sl@0: * Data for enumerated Unicode general category types. sl@0: * See http://www.unicode.org/Public/UNIDATA/UnicodeData.html . sl@0: * @stable ICU 2.0 sl@0: */ sl@0: typedef enum UCharCategory sl@0: { sl@0: /** See note !!. Comments of the form "Cn" are read by genpname. */ sl@0: sl@0: /** Non-category for unassigned and non-character code points. @stable ICU 2.0 */ sl@0: U_UNASSIGNED = 0, sl@0: /** Cn "Other, Not Assigned (no characters in [UnicodeData.txt] have this property)" (same as U_UNASSIGNED!) @stable ICU 2.0 */ sl@0: U_GENERAL_OTHER_TYPES = 0, sl@0: /** Lu @stable ICU 2.0 */ sl@0: U_UPPERCASE_LETTER = 1, sl@0: /** Ll @stable ICU 2.0 */ sl@0: U_LOWERCASE_LETTER = 2, sl@0: /** Lt @stable ICU 2.0 */ sl@0: U_TITLECASE_LETTER = 3, sl@0: /** Lm @stable ICU 2.0 */ sl@0: U_MODIFIER_LETTER = 4, sl@0: /** Lo @stable ICU 2.0 */ sl@0: U_OTHER_LETTER = 5, sl@0: /** Mn @stable ICU 2.0 */ sl@0: U_NON_SPACING_MARK = 6, sl@0: /** Me @stable ICU 2.0 */ sl@0: U_ENCLOSING_MARK = 7, sl@0: /** Mc @stable ICU 2.0 */ sl@0: U_COMBINING_SPACING_MARK = 8, sl@0: /** Nd @stable ICU 2.0 */ sl@0: U_DECIMAL_DIGIT_NUMBER = 9, sl@0: /** Nl @stable ICU 2.0 */ sl@0: U_LETTER_NUMBER = 10, sl@0: /** No @stable ICU 2.0 */ sl@0: U_OTHER_NUMBER = 11, sl@0: /** Zs @stable ICU 2.0 */ sl@0: U_SPACE_SEPARATOR = 12, sl@0: /** Zl @stable ICU 2.0 */ sl@0: U_LINE_SEPARATOR = 13, sl@0: /** Zp @stable ICU 2.0 */ sl@0: U_PARAGRAPH_SEPARATOR = 14, sl@0: /** Cc @stable ICU 2.0 */ sl@0: U_CONTROL_CHAR = 15, sl@0: /** Cf @stable ICU 2.0 */ sl@0: U_FORMAT_CHAR = 16, sl@0: /** Co @stable ICU 2.0 */ sl@0: U_PRIVATE_USE_CHAR = 17, sl@0: /** Cs @stable ICU 2.0 */ sl@0: U_SURROGATE = 18, sl@0: /** Pd @stable ICU 2.0 */ sl@0: U_DASH_PUNCTUATION = 19, sl@0: /** Ps @stable ICU 2.0 */ sl@0: U_START_PUNCTUATION = 20, sl@0: /** Pe @stable ICU 2.0 */ sl@0: U_END_PUNCTUATION = 21, sl@0: /** Pc @stable ICU 2.0 */ sl@0: U_CONNECTOR_PUNCTUATION = 22, sl@0: /** Po @stable ICU 2.0 */ sl@0: U_OTHER_PUNCTUATION = 23, sl@0: /** Sm @stable ICU 2.0 */ sl@0: U_MATH_SYMBOL = 24, sl@0: /** Sc @stable ICU 2.0 */ sl@0: U_CURRENCY_SYMBOL = 25, sl@0: /** Sk @stable ICU 2.0 */ sl@0: U_MODIFIER_SYMBOL = 26, sl@0: /** So @stable ICU 2.0 */ sl@0: U_OTHER_SYMBOL = 27, sl@0: /** Pi @stable ICU 2.0 */ sl@0: U_INITIAL_PUNCTUATION = 28, sl@0: /** Pf @stable ICU 2.0 */ sl@0: U_FINAL_PUNCTUATION = 29, sl@0: /** One higher than the last enum UCharCategory constant. @stable ICU 2.0 */ sl@0: U_CHAR_CATEGORY_COUNT sl@0: } UCharCategory; sl@0: sl@0: /** sl@0: * U_GC_XX_MASK constants are bit flags corresponding to Unicode sl@0: * general category values. sl@0: * For each category, the nth bit is set if the numeric value of the sl@0: * corresponding UCharCategory constant is n. sl@0: * sl@0: * There are also some U_GC_Y_MASK constants for groups of general categories sl@0: * like L for all letter categories. sl@0: * sl@0: * @see u_charType sl@0: * @see U_GET_GC_MASK sl@0: * @see UCharCategory sl@0: * @stable ICU 2.1 sl@0: */ sl@0: #define U_GC_CN_MASK U_MASK(U_GENERAL_OTHER_TYPES) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_LU_MASK U_MASK(U_UPPERCASE_LETTER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_LL_MASK U_MASK(U_LOWERCASE_LETTER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_LT_MASK U_MASK(U_TITLECASE_LETTER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_LM_MASK U_MASK(U_MODIFIER_LETTER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_LO_MASK U_MASK(U_OTHER_LETTER) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_MN_MASK U_MASK(U_NON_SPACING_MARK) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_ME_MASK U_MASK(U_ENCLOSING_MARK) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_MC_MASK U_MASK(U_COMBINING_SPACING_MARK) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_ND_MASK U_MASK(U_DECIMAL_DIGIT_NUMBER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_NL_MASK U_MASK(U_LETTER_NUMBER) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_NO_MASK U_MASK(U_OTHER_NUMBER) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_ZS_MASK U_MASK(U_SPACE_SEPARATOR) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_ZL_MASK U_MASK(U_LINE_SEPARATOR) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_ZP_MASK U_MASK(U_PARAGRAPH_SEPARATOR) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_CC_MASK U_MASK(U_CONTROL_CHAR) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_CF_MASK U_MASK(U_FORMAT_CHAR) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_CO_MASK U_MASK(U_PRIVATE_USE_CHAR) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_CS_MASK U_MASK(U_SURROGATE) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PD_MASK U_MASK(U_DASH_PUNCTUATION) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PS_MASK U_MASK(U_START_PUNCTUATION) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PE_MASK U_MASK(U_END_PUNCTUATION) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PC_MASK U_MASK(U_CONNECTOR_PUNCTUATION) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PO_MASK U_MASK(U_OTHER_PUNCTUATION) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_SM_MASK U_MASK(U_MATH_SYMBOL) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_SC_MASK U_MASK(U_CURRENCY_SYMBOL) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_SK_MASK U_MASK(U_MODIFIER_SYMBOL) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_SO_MASK U_MASK(U_OTHER_SYMBOL) sl@0: sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PI_MASK U_MASK(U_INITIAL_PUNCTUATION) sl@0: /** Mask constant for a UCharCategory. @stable ICU 2.1 */ sl@0: #define U_GC_PF_MASK U_MASK(U_FINAL_PUNCTUATION) sl@0: sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (L Letters). @stable ICU 2.1 */ sl@0: #define U_GC_L_MASK \ sl@0: (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK|U_GC_LM_MASK|U_GC_LO_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (LC Cased Letters). @stable ICU 2.1 */ sl@0: #define U_GC_LC_MASK \ sl@0: (U_GC_LU_MASK|U_GC_LL_MASK|U_GC_LT_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (M Marks). @stable ICU 2.1 */ sl@0: #define U_GC_M_MASK (U_GC_MN_MASK|U_GC_ME_MASK|U_GC_MC_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (N Numbers). @stable ICU 2.1 */ sl@0: #define U_GC_N_MASK (U_GC_ND_MASK|U_GC_NL_MASK|U_GC_NO_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (Z Separators). @stable ICU 2.1 */ sl@0: #define U_GC_Z_MASK (U_GC_ZS_MASK|U_GC_ZL_MASK|U_GC_ZP_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (C Others). @stable ICU 2.1 */ sl@0: #define U_GC_C_MASK \ sl@0: (U_GC_CN_MASK|U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CO_MASK|U_GC_CS_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (P Punctuation). @stable ICU 2.1 */ sl@0: #define U_GC_P_MASK \ sl@0: (U_GC_PD_MASK|U_GC_PS_MASK|U_GC_PE_MASK|U_GC_PC_MASK|U_GC_PO_MASK| \ sl@0: U_GC_PI_MASK|U_GC_PF_MASK) sl@0: sl@0: /** Mask constant for multiple UCharCategory bits (S Symbols). @stable ICU 2.1 */ sl@0: #define U_GC_S_MASK (U_GC_SM_MASK|U_GC_SC_MASK|U_GC_SK_MASK|U_GC_SO_MASK) sl@0: sl@0: /** sl@0: * This specifies the language directional property of a character set. sl@0: * @stable ICU 2.0 sl@0: */ sl@0: typedef enum UCharDirection { sl@0: /** See note !!. Comments of the form "EN" are read by genpname. */ sl@0: sl@0: /** L @stable ICU 2.0 */ sl@0: U_LEFT_TO_RIGHT = 0, sl@0: /** R @stable ICU 2.0 */ sl@0: U_RIGHT_TO_LEFT = 1, sl@0: /** EN @stable ICU 2.0 */ sl@0: U_EUROPEAN_NUMBER = 2, sl@0: /** ES @stable ICU 2.0 */ sl@0: U_EUROPEAN_NUMBER_SEPARATOR = 3, sl@0: /** ET @stable ICU 2.0 */ sl@0: U_EUROPEAN_NUMBER_TERMINATOR = 4, sl@0: /** AN @stable ICU 2.0 */ sl@0: U_ARABIC_NUMBER = 5, sl@0: /** CS @stable ICU 2.0 */ sl@0: U_COMMON_NUMBER_SEPARATOR = 6, sl@0: /** B @stable ICU 2.0 */ sl@0: U_BLOCK_SEPARATOR = 7, sl@0: /** S @stable ICU 2.0 */ sl@0: U_SEGMENT_SEPARATOR = 8, sl@0: /** WS @stable ICU 2.0 */ sl@0: U_WHITE_SPACE_NEUTRAL = 9, sl@0: /** ON @stable ICU 2.0 */ sl@0: U_OTHER_NEUTRAL = 10, sl@0: /** LRE @stable ICU 2.0 */ sl@0: U_LEFT_TO_RIGHT_EMBEDDING = 11, sl@0: /** LRO @stable ICU 2.0 */ sl@0: U_LEFT_TO_RIGHT_OVERRIDE = 12, sl@0: /** AL @stable ICU 2.0 */ sl@0: U_RIGHT_TO_LEFT_ARABIC = 13, sl@0: /** RLE @stable ICU 2.0 */ sl@0: U_RIGHT_TO_LEFT_EMBEDDING = 14, sl@0: /** RLO @stable ICU 2.0 */ sl@0: U_RIGHT_TO_LEFT_OVERRIDE = 15, sl@0: /** PDF @stable ICU 2.0 */ sl@0: U_POP_DIRECTIONAL_FORMAT = 16, sl@0: /** NSM @stable ICU 2.0 */ sl@0: U_DIR_NON_SPACING_MARK = 17, sl@0: /** BN @stable ICU 2.0 */ sl@0: U_BOUNDARY_NEUTRAL = 18, sl@0: /** @stable ICU 2.0 */ sl@0: U_CHAR_DIRECTION_COUNT sl@0: } UCharDirection; sl@0: sl@0: /** sl@0: * Constants for Unicode blocks, see the Unicode Data file Blocks.txt sl@0: * @stable ICU 2.0 sl@0: */ sl@0: enum UBlockCode { sl@0: sl@0: /** New No_Block value in Unicode 4. @stable ICU 2.6 */ sl@0: UBLOCK_NO_BLOCK = 0, /*[none]*/ /* Special range indicating No_Block */ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BASIC_LATIN = 1, /*[0000]*/ /*See note !!*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LATIN_1_SUPPLEMENT=2, /*[0080]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LATIN_EXTENDED_A =3, /*[0100]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LATIN_EXTENDED_B =4, /*[0180]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_IPA_EXTENSIONS =5, /*[0250]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SPACING_MODIFIER_LETTERS =6, /*[02B0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_COMBINING_DIACRITICAL_MARKS =7, /*[0300]*/ sl@0: sl@0: /** sl@0: * Unicode 3.2 renames this block to "Greek and Coptic". sl@0: * @stable ICU 2.0 sl@0: */ sl@0: UBLOCK_GREEK =8, /*[0370]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CYRILLIC =9, /*[0400]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ARMENIAN =10, /*[0530]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HEBREW =11, /*[0590]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ARABIC =12, /*[0600]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SYRIAC =13, /*[0700]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_THAANA =14, /*[0780]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_DEVANAGARI =15, /*[0900]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BENGALI =16, /*[0980]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GURMUKHI =17, /*[0A00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GUJARATI =18, /*[0A80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ORIYA =19, /*[0B00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_TAMIL =20, /*[0B80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_TELUGU =21, /*[0C00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_KANNADA =22, /*[0C80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MALAYALAM =23, /*[0D00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SINHALA =24, /*[0D80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_THAI =25, /*[0E00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LAO =26, /*[0E80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_TIBETAN =27, /*[0F00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MYANMAR =28, /*[1000]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GEORGIAN =29, /*[10A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HANGUL_JAMO =30, /*[1100]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ETHIOPIC =31, /*[1200]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CHEROKEE =32, /*[13A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =33, /*[1400]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_OGHAM =34, /*[1680]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_RUNIC =35, /*[16A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_KHMER =36, /*[1780]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MONGOLIAN =37, /*[1800]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LATIN_EXTENDED_ADDITIONAL =38, /*[1E00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GREEK_EXTENDED =39, /*[1F00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GENERAL_PUNCTUATION =40, /*[2000]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SUPERSCRIPTS_AND_SUBSCRIPTS =41, /*[2070]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CURRENCY_SYMBOLS =42, /*[20A0]*/ sl@0: sl@0: /** sl@0: * Unicode 3.2 renames this block to "Combining Diacritical Marks for Symbols". sl@0: * @stable ICU 2.0 sl@0: */ sl@0: UBLOCK_COMBINING_MARKS_FOR_SYMBOLS =43, /*[20D0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LETTERLIKE_SYMBOLS =44, /*[2100]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_NUMBER_FORMS =45, /*[2150]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ARROWS =46, /*[2190]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MATHEMATICAL_OPERATORS =47, /*[2200]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MISCELLANEOUS_TECHNICAL =48, /*[2300]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CONTROL_PICTURES =49, /*[2400]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_OPTICAL_CHARACTER_RECOGNITION =50, /*[2440]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ENCLOSED_ALPHANUMERICS =51, /*[2460]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BOX_DRAWING =52, /*[2500]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BLOCK_ELEMENTS =53, /*[2580]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GEOMETRIC_SHAPES =54, /*[25A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MISCELLANEOUS_SYMBOLS =55, /*[2600]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_DINGBATS =56, /*[2700]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BRAILLE_PATTERNS =57, /*[2800]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_RADICALS_SUPPLEMENT =58, /*[2E80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_KANGXI_RADICALS =59, /*[2F00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS =60, /*[2FF0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION =61, /*[3000]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HIRAGANA =62, /*[3040]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_KATAKANA =63, /*[30A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BOPOMOFO =64, /*[3100]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HANGUL_COMPATIBILITY_JAMO =65, /*[3130]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_KANBUN =66, /*[3190]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BOPOMOFO_EXTENDED =67, /*[31A0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ENCLOSED_CJK_LETTERS_AND_MONTHS =68, /*[3200]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_COMPATIBILITY =69, /*[3300]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =70, /*[3400]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_UNIFIED_IDEOGRAPHS =71, /*[4E00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_YI_SYLLABLES =72, /*[A000]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_YI_RADICALS =73, /*[A490]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HANGUL_SYLLABLES =74, /*[AC00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HIGH_SURROGATES =75, /*[D800]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HIGH_PRIVATE_USE_SURROGATES =76, /*[DB80]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_LOW_SURROGATES =77, /*[DC00]*/ sl@0: sl@0: /** sl@0: * Same as UBLOCK_PRIVATE_USE_AREA. sl@0: * Until Unicode 3.1.1, the corresponding block name was "Private Use", sl@0: * and multiple code point ranges had this block. sl@0: * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and sl@0: * adds separate blocks for the supplementary PUAs. sl@0: * sl@0: * @stable ICU 2.0 sl@0: */ sl@0: UBLOCK_PRIVATE_USE = 78, sl@0: /** sl@0: * Same as UBLOCK_PRIVATE_USE. sl@0: * Until Unicode 3.1.1, the corresponding block name was "Private Use", sl@0: * and multiple code point ranges had this block. sl@0: * Unicode 3.2 renames the block for the BMP PUA to "Private Use Area" and sl@0: * adds separate blocks for the supplementary PUAs. sl@0: * sl@0: * @stable ICU 2.0 sl@0: */ sl@0: UBLOCK_PRIVATE_USE_AREA =UBLOCK_PRIVATE_USE, /*[E000]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS =79, /*[F900]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ALPHABETIC_PRESENTATION_FORMS =80, /*[FB00]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ARABIC_PRESENTATION_FORMS_A =81, /*[FB50]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_COMBINING_HALF_MARKS =82, /*[FE20]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_COMPATIBILITY_FORMS =83, /*[FE30]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SMALL_FORM_VARIANTS =84, /*[FE50]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_ARABIC_PRESENTATION_FORMS_B =85, /*[FE70]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_SPECIALS =86, /*[FFF0]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS =87, /*[FF00]*/ sl@0: sl@0: /* New blocks in Unicode 3.1 */ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_OLD_ITALIC = 88 , /*[10300]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_GOTHIC = 89 , /*[10330]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_DESERET = 90 , /*[10400]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_BYZANTINE_MUSICAL_SYMBOLS = 91 , /*[1D000]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MUSICAL_SYMBOLS = 92 , /*[1D100]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_MATHEMATICAL_ALPHANUMERIC_SYMBOLS = 93 , /*[1D400]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = 94 , /*[20000]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = 95 , /*[2F800]*/ sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_TAGS = 96, /*[E0000]*/ sl@0: sl@0: /* New blocks in Unicode 3.2 */ sl@0: sl@0: /** sl@0: * Unicode 4.0.1 renames the "Cyrillic Supplementary" block to "Cyrillic Supplement". sl@0: * @stable ICU 2.2 sl@0: */ sl@0: UBLOCK_CYRILLIC_SUPPLEMENTARY = 97, sl@0: /** @draft ICU 3.0 */ sl@0: UBLOCK_CYRILLIC_SUPPLEMENT = UBLOCK_CYRILLIC_SUPPLEMENTARY, /*[0500]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_TAGALOG = 98, /*[1700]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_HANUNOO = 99, /*[1720]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_BUHID = 100, /*[1740]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_TAGBANWA = 101, /*[1760]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = 102, /*[27C0]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_SUPPLEMENTAL_ARROWS_A = 103, /*[27F0]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_SUPPLEMENTAL_ARROWS_B = 104, /*[2900]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = 105, /*[2980]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_SUPPLEMENTAL_MATHEMATICAL_OPERATORS = 106, /*[2A00]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_KATAKANA_PHONETIC_EXTENSIONS = 107, /*[31F0]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_VARIATION_SELECTORS = 108, /*[FE00]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_A = 109, /*[F0000]*/ sl@0: /** @stable ICU 2.2 */ sl@0: UBLOCK_SUPPLEMENTARY_PRIVATE_USE_AREA_B = 110, /*[100000]*/ sl@0: sl@0: /* New blocks in Unicode 4 */ sl@0: sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_LIMBU = 111, /*[1900]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_TAI_LE = 112, /*[1950]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_KHMER_SYMBOLS = 113, /*[19E0]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_PHONETIC_EXTENSIONS = 114, /*[1D00]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_MISCELLANEOUS_SYMBOLS_AND_ARROWS = 115, /*[2B00]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_YIJING_HEXAGRAM_SYMBOLS = 116, /*[4DC0]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_LINEAR_B_SYLLABARY = 117, /*[10000]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_LINEAR_B_IDEOGRAMS = 118, /*[10080]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_AEGEAN_NUMBERS = 119, /*[10100]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_UGARITIC = 120, /*[10380]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_SHAVIAN = 121, /*[10450]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_OSMANYA = 122, /*[10480]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_CYPRIOT_SYLLABARY = 123, /*[10800]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_TAI_XUAN_JING_SYMBOLS = 124, /*[1D300]*/ sl@0: /** @stable ICU 2.6 */ sl@0: UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ sl@0: sl@0: /* New blocks in Unicode 4.1 */ sl@0: sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_BUGINESE = 129, /*[1A00]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_CJK_STROKES = 130, /*[31C0]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_COPTIC = 132, /*[2C80]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_GLAGOLITIC = 136, /*[2C00]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_KHAROSHTHI = 137, /*[10A00]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_TIFINAGH = 144, /*[2D30]*/ sl@0: /** @draft ICU 3.4 */ sl@0: UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/ sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_COUNT, sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: UBLOCK_INVALID_CODE=-1 sl@0: }; sl@0: sl@0: /** @stable ICU 2.0 */ sl@0: typedef enum UBlockCode UBlockCode; sl@0: sl@0: /** sl@0: * East Asian Width constants. sl@0: * sl@0: * @see UCHAR_EAST_ASIAN_WIDTH sl@0: * @see u_getIntPropertyValue sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum UEastAsianWidth { sl@0: U_EA_NEUTRAL, /*[N]*/ /*See note !!*/ sl@0: U_EA_AMBIGUOUS, /*[A]*/ sl@0: U_EA_HALFWIDTH, /*[H]*/ sl@0: U_EA_FULLWIDTH, /*[F]*/ sl@0: U_EA_NARROW, /*[Na]*/ sl@0: U_EA_WIDE, /*[W]*/ sl@0: U_EA_COUNT sl@0: } UEastAsianWidth; sl@0: /* sl@0: * Implementation note: sl@0: * Keep UEastAsianWidth constant values in sync with names list in genprops/props2.c. sl@0: */ sl@0: sl@0: /** sl@0: * Selector constants for u_charName(). sl@0: * u_charName() returns the "modern" name of a sl@0: * Unicode character; or the name that was defined in sl@0: * Unicode version 1.0, before the Unicode standard merged sl@0: * with ISO-10646; or an "extended" name that gives each sl@0: * Unicode code point a unique name. sl@0: * sl@0: * @see u_charName sl@0: * @stable ICU 2.0 sl@0: */ sl@0: typedef enum UCharNameChoice { sl@0: U_UNICODE_CHAR_NAME, sl@0: U_UNICODE_10_CHAR_NAME, sl@0: U_EXTENDED_CHAR_NAME, sl@0: U_CHAR_NAME_CHOICE_COUNT sl@0: } UCharNameChoice; sl@0: sl@0: /** sl@0: * Selector constants for u_getPropertyName() and sl@0: * u_getPropertyValueName(). These selectors are used to choose which sl@0: * name is returned for a given property or value. All properties and sl@0: * values have a long name. Most have a short name, but some do not. sl@0: * Unicode allows for additional names, beyond the long and short sl@0: * name, which would be indicated by U_LONG_PROPERTY_NAME + i, where sl@0: * i=1, 2,... sl@0: * sl@0: * @see u_getPropertyName() sl@0: * @see u_getPropertyValueName() sl@0: * @stable ICU 2.4 sl@0: */ sl@0: typedef enum UPropertyNameChoice { sl@0: U_SHORT_PROPERTY_NAME, sl@0: U_LONG_PROPERTY_NAME, sl@0: U_PROPERTY_NAME_CHOICE_COUNT sl@0: } UPropertyNameChoice; sl@0: sl@0: /** sl@0: * Decomposition Type constants. sl@0: * sl@0: * @see UCHAR_DECOMPOSITION_TYPE sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum UDecompositionType { sl@0: U_DT_NONE, /*[none]*/ /*See note !!*/ sl@0: U_DT_CANONICAL, /*[can]*/ sl@0: U_DT_COMPAT, /*[com]*/ sl@0: U_DT_CIRCLE, /*[enc]*/ sl@0: U_DT_FINAL, /*[fin]*/ sl@0: U_DT_FONT, /*[font]*/ sl@0: U_DT_FRACTION, /*[fra]*/ sl@0: U_DT_INITIAL, /*[init]*/ sl@0: U_DT_ISOLATED, /*[iso]*/ sl@0: U_DT_MEDIAL, /*[med]*/ sl@0: U_DT_NARROW, /*[nar]*/ sl@0: U_DT_NOBREAK, /*[nb]*/ sl@0: U_DT_SMALL, /*[sml]*/ sl@0: U_DT_SQUARE, /*[sqr]*/ sl@0: U_DT_SUB, /*[sub]*/ sl@0: U_DT_SUPER, /*[sup]*/ sl@0: U_DT_VERTICAL, /*[vert]*/ sl@0: U_DT_WIDE, /*[wide]*/ sl@0: U_DT_COUNT /* 18 */ sl@0: } UDecompositionType; sl@0: sl@0: /** sl@0: * Joining Type constants. sl@0: * sl@0: * @see UCHAR_JOINING_TYPE sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum UJoiningType { sl@0: U_JT_NON_JOINING, /*[U]*/ /*See note !!*/ sl@0: U_JT_JOIN_CAUSING, /*[C]*/ sl@0: U_JT_DUAL_JOINING, /*[D]*/ sl@0: U_JT_LEFT_JOINING, /*[L]*/ sl@0: U_JT_RIGHT_JOINING, /*[R]*/ sl@0: U_JT_TRANSPARENT, /*[T]*/ sl@0: U_JT_COUNT /* 6 */ sl@0: } UJoiningType; sl@0: sl@0: /** sl@0: * Joining Group constants. sl@0: * sl@0: * @see UCHAR_JOINING_GROUP sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum UJoiningGroup { sl@0: U_JG_NO_JOINING_GROUP, sl@0: U_JG_AIN, sl@0: U_JG_ALAPH, sl@0: U_JG_ALEF, sl@0: U_JG_BEH, sl@0: U_JG_BETH, sl@0: U_JG_DAL, sl@0: U_JG_DALATH_RISH, sl@0: U_JG_E, sl@0: U_JG_FEH, sl@0: U_JG_FINAL_SEMKATH, sl@0: U_JG_GAF, sl@0: U_JG_GAMAL, sl@0: U_JG_HAH, sl@0: U_JG_HAMZA_ON_HEH_GOAL, sl@0: U_JG_HE, sl@0: U_JG_HEH, sl@0: U_JG_HEH_GOAL, sl@0: U_JG_HETH, sl@0: U_JG_KAF, sl@0: U_JG_KAPH, sl@0: U_JG_KNOTTED_HEH, sl@0: U_JG_LAM, sl@0: U_JG_LAMADH, sl@0: U_JG_MEEM, sl@0: U_JG_MIM, sl@0: U_JG_NOON, sl@0: U_JG_NUN, sl@0: U_JG_PE, sl@0: U_JG_QAF, sl@0: U_JG_QAPH, sl@0: U_JG_REH, sl@0: U_JG_REVERSED_PE, sl@0: U_JG_SAD, sl@0: U_JG_SADHE, sl@0: U_JG_SEEN, sl@0: U_JG_SEMKATH, sl@0: U_JG_SHIN, sl@0: U_JG_SWASH_KAF, sl@0: U_JG_SYRIAC_WAW, sl@0: U_JG_TAH, sl@0: U_JG_TAW, sl@0: U_JG_TEH_MARBUTA, sl@0: U_JG_TETH, sl@0: U_JG_WAW, sl@0: U_JG_YEH, sl@0: U_JG_YEH_BARREE, sl@0: U_JG_YEH_WITH_TAIL, sl@0: U_JG_YUDH, sl@0: U_JG_YUDH_HE, sl@0: U_JG_ZAIN, sl@0: U_JG_FE, /**< @stable ICU 2.6 */ sl@0: U_JG_KHAPH, /**< @stable ICU 2.6 */ sl@0: U_JG_ZHAIN, /**< @stable ICU 2.6 */ sl@0: U_JG_COUNT sl@0: } UJoiningGroup; sl@0: sl@0: /** sl@0: * Grapheme Cluster Break constants. sl@0: * sl@0: * @see UCHAR_GRAPHEME_CLUSTER_BREAK sl@0: * @draft ICU 3.4 sl@0: */ sl@0: typedef enum UGraphemeClusterBreak { sl@0: U_GCB_OTHER, /*[XX]*/ /*See note !!*/ sl@0: U_GCB_CONTROL, /*[CN]*/ sl@0: U_GCB_CR, /*[CR]*/ sl@0: U_GCB_EXTEND, /*[EX]*/ sl@0: U_GCB_L, /*[L]*/ sl@0: U_GCB_LF, /*[LF]*/ sl@0: U_GCB_LV, /*[LV]*/ sl@0: U_GCB_LVT, /*[LVT]*/ sl@0: U_GCB_T, /*[T]*/ sl@0: U_GCB_V, /*[V]*/ sl@0: U_GCB_COUNT sl@0: } UGraphemeClusterBreak; sl@0: sl@0: /** sl@0: * Word Break constants. sl@0: * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) sl@0: * sl@0: * @see UCHAR_WORD_BREAK sl@0: * @draft ICU 3.4 sl@0: */ sl@0: typedef enum UWordBreakValues { sl@0: U_WB_OTHER, /*[XX]*/ /*See note !!*/ sl@0: U_WB_ALETTER, /*[LE]*/ sl@0: U_WB_FORMAT, /*[FO]*/ sl@0: U_WB_KATAKANA, /*[KA]*/ sl@0: U_WB_MIDLETTER, /*[ML]*/ sl@0: U_WB_MIDNUM, /*[MN]*/ sl@0: U_WB_NUMERIC, /*[NU]*/ sl@0: U_WB_EXTENDNUMLET, /*[EX]*/ sl@0: U_WB_COUNT sl@0: } UWordBreakValues; sl@0: sl@0: /** sl@0: * Sentence Break constants. sl@0: * sl@0: * @see UCHAR_SENTENCE_BREAK sl@0: * @draft ICU 3.4 sl@0: */ sl@0: typedef enum USentenceBreak { sl@0: U_SB_OTHER, /*[XX]*/ /*See note !!*/ sl@0: U_SB_ATERM, /*[AT]*/ sl@0: U_SB_CLOSE, /*[CL]*/ sl@0: U_SB_FORMAT, /*[FO]*/ sl@0: U_SB_LOWER, /*[LO]*/ sl@0: U_SB_NUMERIC, /*[NU]*/ sl@0: U_SB_OLETTER, /*[LE]*/ sl@0: U_SB_SEP, /*[SE]*/ sl@0: U_SB_SP, /*[SP]*/ sl@0: U_SB_STERM, /*[ST]*/ sl@0: U_SB_UPPER, /*[UP]*/ sl@0: U_SB_COUNT sl@0: } USentenceBreak; sl@0: sl@0: /** sl@0: * Line Break constants. sl@0: * sl@0: * @see UCHAR_LINE_BREAK sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum ULineBreak { sl@0: U_LB_UNKNOWN, /*[XX]*/ /*See note !!*/ sl@0: U_LB_AMBIGUOUS, /*[AI]*/ sl@0: U_LB_ALPHABETIC, /*[AL]*/ sl@0: U_LB_BREAK_BOTH, /*[B2]*/ sl@0: U_LB_BREAK_AFTER, /*[BA]*/ sl@0: U_LB_BREAK_BEFORE, /*[BB]*/ sl@0: U_LB_MANDATORY_BREAK, /*[BK]*/ sl@0: U_LB_CONTINGENT_BREAK, /*[CB]*/ sl@0: U_LB_CLOSE_PUNCTUATION, /*[CL]*/ sl@0: U_LB_COMBINING_MARK, /*[CM]*/ sl@0: U_LB_CARRIAGE_RETURN, /*[CR]*/ sl@0: U_LB_EXCLAMATION, /*[EX]*/ sl@0: U_LB_GLUE, /*[GL]*/ sl@0: U_LB_HYPHEN, /*[HY]*/ sl@0: U_LB_IDEOGRAPHIC, /*[ID]*/ sl@0: U_LB_INSEPERABLE, sl@0: /** Renamed from the misspelled "inseperable" in Unicode 4.0.1/ICU 3.0 @draft ICU 3.0 */ sl@0: U_LB_INSEPARABLE=U_LB_INSEPERABLE,/*[IN]*/ sl@0: U_LB_INFIX_NUMERIC, /*[IS]*/ sl@0: U_LB_LINE_FEED, /*[LF]*/ sl@0: U_LB_NONSTARTER, /*[NS]*/ sl@0: U_LB_NUMERIC, /*[NU]*/ sl@0: U_LB_OPEN_PUNCTUATION, /*[OP]*/ sl@0: U_LB_POSTFIX_NUMERIC, /*[PO]*/ sl@0: U_LB_PREFIX_NUMERIC, /*[PR]*/ sl@0: U_LB_QUOTATION, /*[QU]*/ sl@0: U_LB_COMPLEX_CONTEXT, /*[SA]*/ sl@0: U_LB_SURROGATE, /*[SG]*/ sl@0: U_LB_SPACE, /*[SP]*/ sl@0: U_LB_BREAK_SYMBOLS, /*[SY]*/ sl@0: U_LB_ZWSPACE, /*[ZW]*/ sl@0: U_LB_NEXT_LINE, /*[NL]*/ /* from here on: new in Unicode 4/ICU 2.6 */ sl@0: U_LB_WORD_JOINER, /*[WJ]*/ sl@0: U_LB_H2, /*[H2]*/ /* from here on: new in Unicode 4.1/ICU 3.4 */ sl@0: U_LB_H3, /*[H3]*/ sl@0: U_LB_JL, /*[JL]*/ sl@0: U_LB_JT, /*[JT]*/ sl@0: U_LB_JV, /*[JV]*/ sl@0: U_LB_COUNT sl@0: } ULineBreak; sl@0: sl@0: /** sl@0: * Numeric Type constants. sl@0: * sl@0: * @see UCHAR_NUMERIC_TYPE sl@0: * @stable ICU 2.2 sl@0: */ sl@0: typedef enum UNumericType { sl@0: U_NT_NONE, /*[None]*/ /*See note !!*/ sl@0: U_NT_DECIMAL, /*[de]*/ sl@0: U_NT_DIGIT, /*[di]*/ sl@0: U_NT_NUMERIC, /*[nu]*/ sl@0: U_NT_COUNT sl@0: } UNumericType; sl@0: sl@0: /** sl@0: * Hangul Syllable Type constants. sl@0: * sl@0: * @see UCHAR_HANGUL_SYLLABLE_TYPE sl@0: * @stable ICU 2.6 sl@0: */ sl@0: typedef enum UHangulSyllableType { sl@0: U_HST_NOT_APPLICABLE, /*[NA]*/ /*See note !!*/ sl@0: U_HST_LEADING_JAMO, /*[L]*/ sl@0: U_HST_VOWEL_JAMO, /*[V]*/ sl@0: U_HST_TRAILING_JAMO, /*[T]*/ sl@0: U_HST_LV_SYLLABLE, /*[LV]*/ sl@0: U_HST_LVT_SYLLABLE, /*[LVT]*/ sl@0: U_HST_COUNT sl@0: } UHangulSyllableType; sl@0: sl@0: /** sl@0: * Check a binary Unicode property for a code point. sl@0: * sl@0: * Unicode, especially in version 3.2, defines many more properties than the sl@0: * original set in UnicodeData.txt. sl@0: * sl@0: * The properties APIs are intended to reflect Unicode properties as defined sl@0: * in the Unicode Character Database (UCD) and Unicode Technical Reports (UTR). sl@0: * For details about the properties see http://www.unicode.org/ucd/ . sl@0: * For names of Unicode properties see the UCD file PropertyAliases.txt. sl@0: * sl@0: * Important: If ICU is built with UCD files from Unicode versions below 3.2, sl@0: * then properties marked with "new in Unicode 3.2" are not or not fully available. sl@0: * sl@0: * @param c Code point to test. sl@0: * @param which UProperty selector constant, identifies which binary property to check. sl@0: * Must be UCHAR_BINARY_START<=which=0. sl@0: * True for characters with general category "Nd" (decimal digit numbers) sl@0: * as well as Latin letters a-f and A-F in both ASCII and Fullwidth ASCII. sl@0: * (That is, for letters with code points sl@0: * 0041..0046, 0061..0066, FF21..FF26, FF41..FF46.) sl@0: * sl@0: * In order to narrow the definition of hexadecimal digits to only ASCII sl@0: * characters, use (c<=0x7f && u_isxdigit(c)). sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a hexadecimal digit sl@0: * sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isxdigit(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a punctuation character. sl@0: * True for characters with general categories "P" (punctuation). sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a punctuation character sl@0: * sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_ispunct(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a "graphic" character sl@0: * (printable, excluding spaces). sl@0: * TRUE for all characters except those with general categories sl@0: * "Cc" (control codes), "Cf" (format controls), "Cs" (surrogates), sl@0: * "Cn" (unassigned), and "Z" (separators). sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a "graphic" character sl@0: * sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isgraph(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a "blank" or "horizontal space", sl@0: * a character that visibly separates words on a line. sl@0: * The following are equivalent definitions: sl@0: * sl@0: * TRUE for Unicode White_Space characters except for "vertical space controls" sl@0: * where "vertical space controls" are the following characters: sl@0: * U+000A (LF) U+000B (VT) U+000C (FF) U+000D (CR) U+0085 (NEL) U+2028 (LS) U+2029 (PS) sl@0: * sl@0: * same as sl@0: * sl@0: * TRUE for U+0009 (TAB) and characters with general category "Zs" (space separators) sl@0: * except Zero Width Space (ZWSP, U+200B). sl@0: * sl@0: * Note: There are several ICU whitespace functions; please see the uchar.h sl@0: * file documentation for a detailed comparison. sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a "blank" sl@0: * sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isblank(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is "defined", sl@0: * which usually means that it is assigned a character. sl@0: * True for general categories other than "Cn" (other, not assigned), sl@0: * i.e., true for all code points mentioned in UnicodeData.txt. sl@0: * sl@0: * Note that non-character code points (e.g., U+FDD0) are not "defined" sl@0: * (they are Cn), but surrogate code points are "defined" (Cs). sl@0: * sl@0: * Same as java.lang.Character.isDefined(). sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is assigned a character sl@0: * sl@0: * @see u_isdigit sl@0: * @see u_isalpha sl@0: * @see u_isalnum sl@0: * @see u_isupper sl@0: * @see u_islower sl@0: * @see u_istitle sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isdefined(UChar32 c); sl@0: sl@0: /** sl@0: * Determines if the specified character is a space character or not. sl@0: * sl@0: * Note: There are several ICU whitespace functions; please see the uchar.h sl@0: * file documentation for a detailed comparison. sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the character to be tested sl@0: * @return true if the character is a space character; false otherwise. sl@0: * sl@0: * @see u_isJavaSpaceChar sl@0: * @see u_isWhitespace sl@0: * @see u_isUWhiteSpace sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isspace(UChar32 c); sl@0: sl@0: /** sl@0: * Determine if the specified code point is a space character according to Java. sl@0: * True for characters with general categories "Z" (separators), sl@0: * which does not include control codes (e.g., TAB or Line Feed). sl@0: * sl@0: * Same as java.lang.Character.isSpaceChar(). sl@0: * sl@0: * Note: There are several ICU whitespace functions; please see the uchar.h sl@0: * file documentation for a detailed comparison. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a space character according to Character.isSpaceChar() sl@0: * sl@0: * @see u_isspace sl@0: * @see u_isWhitespace sl@0: * @see u_isUWhiteSpace sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isJavaSpaceChar(UChar32 c); sl@0: sl@0: /** sl@0: * Determines if the specified code point is a whitespace character according to Java/ICU. sl@0: * A character is considered to be a Java whitespace character if and only sl@0: * if it satisfies one of the following criteria: sl@0: * sl@0: * - It is a Unicode separator (categories "Z"), but is not sl@0: * a no-break space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). sl@0: * - It is U+0009 HORIZONTAL TABULATION. sl@0: * - It is U+000A LINE FEED. sl@0: * - It is U+000B VERTICAL TABULATION. sl@0: * - It is U+000C FORM FEED. sl@0: * - It is U+000D CARRIAGE RETURN. sl@0: * - It is U+001C FILE SEPARATOR. sl@0: * - It is U+001D GROUP SEPARATOR. sl@0: * - It is U+001E RECORD SEPARATOR. sl@0: * - It is U+001F UNIT SEPARATOR. sl@0: * - It is U+0085 NEXT LINE. sl@0: * sl@0: * Same as java.lang.Character.isWhitespace() except that Java omits U+0085. sl@0: * sl@0: * Note: There are several ICU whitespace functions; please see the uchar.h sl@0: * file documentation for a detailed comparison. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a whitespace character according to Java/ICU sl@0: * sl@0: * @see u_isspace sl@0: * @see u_isJavaSpaceChar sl@0: * @see u_isUWhiteSpace sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isWhitespace(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a control character sl@0: * (as defined by this function). sl@0: * A control character is one of the following: sl@0: * - ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f) sl@0: * - U_CONTROL_CHAR (Cc) sl@0: * - U_FORMAT_CHAR (Cf) sl@0: * - U_LINE_SEPARATOR (Zl) sl@0: * - U_PARAGRAPH_SEPARATOR (Zp) sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a control character sl@0: * sl@0: * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT sl@0: * @see u_isprint sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_iscntrl(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is an ISO control code. sl@0: * True for U+0000..U+001f and U+007f..U+009f (general category "Cc"). sl@0: * sl@0: * Same as java.lang.Character.isISOControl(). sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is an ISO control code sl@0: * sl@0: * @see u_iscntrl sl@0: * @stable ICU 2.6 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isISOControl(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a printable character. sl@0: * True for general categories other than "C" (controls). sl@0: * sl@0: * This is a C/POSIX migration function. sl@0: * See the comments about C/POSIX character classification functions in the sl@0: * documentation at the top of this header file. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a printable character sl@0: * sl@0: * @see UCHAR_DEFAULT_IGNORABLE_CODE_POINT sl@0: * @see u_iscntrl sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isprint(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the specified code point is a base character. sl@0: * True for general categories "L" (letters), "N" (numbers), sl@0: * "Mc" (spacing combining marks), and "Me" (enclosing marks). sl@0: * sl@0: * Note that this is different from the Unicode definition in sl@0: * chapter 3.5, conformance clause D13, sl@0: * which defines base characters to be all characters (not Cn) sl@0: * that do not graphically combine with preceding characters (M) sl@0: * and that are neither control (Cc) or format (Cf) characters. sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the code point is a base character according to this function sl@0: * sl@0: * @see u_isalpha sl@0: * @see u_isdigit sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isbase(UChar32 c); sl@0: sl@0: /** sl@0: * Returns the bidirectional category value for the code point, sl@0: * which is used in the Unicode bidirectional algorithm sl@0: * (UAX #9 http://www.unicode.org/reports/tr9/). sl@0: * Note that some unassigned code points have bidi values sl@0: * of R or AL because they are in blocks that are reserved sl@0: * for Right-To-Left scripts. sl@0: * sl@0: * Same as java.lang.Character.getDirectionality() sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return the bidirectional category (UCharDirection) value sl@0: * sl@0: * @see UCharDirection sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UCharDirection U_EXPORT2 sl@0: u_charDirection(UChar32 c); sl@0: sl@0: /** sl@0: * Determines whether the code point has the Bidi_Mirrored property. sl@0: * This property is set for characters that are commonly used in sl@0: * Right-To-Left contexts and need to be displayed with a "mirrored" sl@0: * glyph. sl@0: * sl@0: * Same as java.lang.Character.isMirrored(). sl@0: * Same as UCHAR_BIDI_MIRRORED sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return TRUE if the character has the Bidi_Mirrored property sl@0: * sl@0: * @see UCHAR_BIDI_MIRRORED sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UBool U_EXPORT2 sl@0: u_isMirrored(UChar32 c); sl@0: sl@0: /** sl@0: * Maps the specified character to a "mirror-image" character. sl@0: * For characters with the Bidi_Mirrored property, implementations sl@0: * sometimes need a "poor man's" mapping to another Unicode sl@0: * character (code point) such that the default glyph may serve sl@0: * as the mirror-image of the default glyph of the specified sl@0: * character. This is useful for text conversion to and from sl@0: * codepages with visual order, and for displays without glyph sl@0: * selecetion capabilities. sl@0: * sl@0: * @param c the code point to be mapped sl@0: * @return another Unicode code point that may serve as a mirror-image sl@0: * substitute, or c itself if there is no such mapping or c sl@0: * does not have the Bidi_Mirrored property sl@0: * sl@0: * @see UCHAR_BIDI_MIRRORED sl@0: * @see u_isMirrored sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UChar32 U_EXPORT2 sl@0: u_charMirror(UChar32 c); sl@0: sl@0: /** sl@0: * Returns the general category value for the code point. sl@0: * sl@0: * Same as java.lang.Character.getType(). sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return the general category (UCharCategory) value sl@0: * sl@0: * @see UCharCategory sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE int8_t U_EXPORT2 sl@0: u_charType(UChar32 c); sl@0: sl@0: /** sl@0: * Get a single-bit bit set for the general category of a character. sl@0: * This bit set can be compared bitwise with U_GC_SM_MASK, U_GC_L_MASK, etc. sl@0: * Same as U_MASK(u_charType(c)). sl@0: * sl@0: * @param c the code point to be tested sl@0: * @return a single-bit mask corresponding to the general category (UCharCategory) value sl@0: * sl@0: * @see u_charType sl@0: * @see UCharCategory sl@0: * @see U_GC_CN_MASK sl@0: * @stable ICU 2.1 sl@0: */ sl@0: #define U_GET_GC_MASK(c) U_MASK(u_charType(c)) sl@0: sl@0: /** sl@0: * Callback from u_enumCharTypes(), is called for each contiguous range sl@0: * of code points c (where start<=cnameChoice, the character name written sl@0: * into the buffer is the "modern" name or the name that was defined sl@0: * in Unicode version 1.0. sl@0: * The name contains only "invariant" characters sl@0: * like A-Z, 0-9, space, and '-'. sl@0: * Unicode 1.0 names are only retrieved if they are different from the modern sl@0: * names and if the data file contains the data for them. gennames may or may sl@0: * not be called with a command line option to include 1.0 names in unames.dat. sl@0: * sl@0: * @param code The character (code point) for which to get the name. sl@0: * It must be 0<=code<=0x10ffff. sl@0: * @param nameChoice Selector for which name to get. sl@0: * @param buffer Destination address for copying the name. sl@0: * The name will always be zero-terminated. sl@0: * If there is no name, then the buffer will be set to the empty string. sl@0: * @param bufferLength ==sizeof(buffer) sl@0: * @param pErrorCode Pointer to a UErrorCode variable; sl@0: * check for U_SUCCESS() after u_charName() sl@0: * returns. sl@0: * @return The length of the name, or 0 if there is no name for this character. sl@0: * If the bufferLength is less than or equal to the length, then the buffer sl@0: * contains the truncated name and the returned length indicates the full sl@0: * length of the name. sl@0: * The length does not include the zero-termination. sl@0: * sl@0: * @see UCharNameChoice sl@0: * @see u_charFromName sl@0: * @see u_enumCharNames sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE int32_t U_EXPORT2 sl@0: u_charName(UChar32 code, UCharNameChoice nameChoice, sl@0: char *buffer, int32_t bufferLength, sl@0: UErrorCode *pErrorCode); sl@0: sl@0: /** sl@0: * Get the ISO 10646 comment for a character. sl@0: * The ISO 10646 comment is an informative field in the Unicode Character sl@0: * Database (UnicodeData.txt field 11) and is from the ISO 10646 names list. sl@0: * sl@0: * @param c The character (code point) for which to get the ISO comment. sl@0: * It must be 0<=c<=0x10ffff. sl@0: * @param dest Destination address for copying the comment. sl@0: * The comment will be zero-terminated if possible. sl@0: * If there is no comment, then the buffer will be set to the empty string. sl@0: * @param destCapacity ==sizeof(dest) sl@0: * @param pErrorCode Pointer to a UErrorCode variable; sl@0: * check for U_SUCCESS() after u_getISOComment() sl@0: * returns. sl@0: * @return The length of the comment, or 0 if there is no comment for this character. sl@0: * If the destCapacity is less than or equal to the length, then the buffer sl@0: * contains the truncated name and the returned length indicates the full sl@0: * length of the name. sl@0: * The length does not include the zero-termination. sl@0: * sl@0: * @stable ICU 2.2 sl@0: */ sl@0: U_STABLE int32_t U_EXPORT2 sl@0: u_getISOComment(UChar32 c, sl@0: char *dest, int32_t destCapacity, sl@0: UErrorCode *pErrorCode); sl@0: sl@0: /** sl@0: * Find a Unicode character by its name and return its code point value. sl@0: * The name is matched exactly and completely. sl@0: * If the name does not correspond to a code point, pErrorCode sl@0: * is set to U_INVALID_CHAR_FOUND. sl@0: * A Unicode 1.0 name is matched only if it differs from the modern name. sl@0: * Unicode names are all uppercase. Extended names are lowercase followed sl@0: * by an uppercase hexadecimal number, and within angle brackets. sl@0: * sl@0: * @param nameChoice Selector for which name to match. sl@0: * @param name The name to match. sl@0: * @param pErrorCode Pointer to a UErrorCode variable sl@0: * @return The Unicode value of the code point with the given name, sl@0: * or an undefined value if there is no such code point. sl@0: * sl@0: * @see UCharNameChoice sl@0: * @see u_charName sl@0: * @see u_enumCharNames sl@0: * @stable ICU 1.7 sl@0: */ sl@0: U_STABLE UChar32 U_EXPORT2 sl@0: u_charFromName(UCharNameChoice nameChoice, sl@0: const char *name, sl@0: UErrorCode *pErrorCode); sl@0: sl@0: /** sl@0: * Type of a callback function for u_enumCharNames() that gets called sl@0: * for each Unicode character with the code point value and sl@0: * the character name. sl@0: * If such a function returns FALSE, then the enumeration is stopped. sl@0: * sl@0: * @param context The context pointer that was passed to u_enumCharNames(). sl@0: * @param code The Unicode code point for the character with this name. sl@0: * @param nameChoice Selector for which kind of names is enumerated. sl@0: * @param name The character's name, zero-terminated. sl@0: * @param length The length of the name. sl@0: * @return TRUE if the enumeration should continue, FALSE to stop it. sl@0: * sl@0: * @see UCharNameChoice sl@0: * @see u_enumCharNames sl@0: * @stable ICU 1.7 sl@0: */ sl@0: typedef UBool UEnumCharNamesFn(void *context, sl@0: UChar32 code, sl@0: UCharNameChoice nameChoice, sl@0: const char *name, sl@0: int32_t length); sl@0: sl@0: /** sl@0: * Enumerate all assigned Unicode characters between the start and limit sl@0: * code points (start inclusive, limit exclusive) and call a function sl@0: * for each, passing the code point value and the character name. sl@0: * For Unicode 1.0 names, only those are enumerated that differ from the sl@0: * modern names. sl@0: * sl@0: * @param start The first code point in the enumeration range. sl@0: * @param limit One more than the last code point in the enumeration range sl@0: * (the first one after the range). sl@0: * @param fn The function that is to be called for each character name. sl@0: * @param context An arbitrary pointer that is passed to the function. sl@0: * @param nameChoice Selector for which kind of names to enumerate. sl@0: * @param pErrorCode Pointer to a UErrorCode variable sl@0: * sl@0: * @see UCharNameChoice sl@0: * @see UEnumCharNamesFn sl@0: * @see u_charName sl@0: * @see u_charFromName sl@0: * @stable ICU 1.7 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_enumCharNames(UChar32 start, UChar32 limit, sl@0: UEnumCharNamesFn *fn, sl@0: void *context, sl@0: UCharNameChoice nameChoice, sl@0: UErrorCode *pErrorCode); sl@0: sl@0: /** sl@0: * Return the Unicode name for a given property, as given in the sl@0: * Unicode database file PropertyAliases.txt. sl@0: * sl@0: * In addition, this function maps the property sl@0: * UCHAR_GENERAL_CATEGORY_MASK to the synthetic names "gcm" / sl@0: * "General_Category_Mask". These names are not in sl@0: * PropertyAliases.txt. sl@0: * sl@0: * @param property UProperty selector other than UCHAR_INVALID_CODE. sl@0: * If out of range, NULL is returned. sl@0: * sl@0: * @param nameChoice selector for which name to get. If out of range, sl@0: * NULL is returned. All properties have a long name. Most sl@0: * have a short name, but some do not. Unicode allows for sl@0: * additional names; if present these will be returned by sl@0: * U_LONG_PROPERTY_NAME + i, where i=1, 2,... sl@0: * sl@0: * @return a pointer to the name, or NULL if either the sl@0: * property or the nameChoice is out of range. If a given sl@0: * nameChoice returns NULL, then all larger values of sl@0: * nameChoice will return NULL, with one exception: if NULL is sl@0: * returned for U_SHORT_PROPERTY_NAME, then sl@0: * U_LONG_PROPERTY_NAME (and higher) may still return a sl@0: * non-NULL value. The returned pointer is valid until sl@0: * u_cleanup() is called. sl@0: * sl@0: * @see UProperty sl@0: * @see UPropertyNameChoice sl@0: * @stable ICU 2.4 sl@0: */ sl@0: U_STABLE const char* U_EXPORT2 sl@0: u_getPropertyName(UProperty property, sl@0: UPropertyNameChoice nameChoice); sl@0: sl@0: /** sl@0: * Return the UProperty enum for a given property name, as specified sl@0: * in the Unicode database file PropertyAliases.txt. Short, long, and sl@0: * any other variants are recognized. sl@0: * sl@0: * In addition, this function maps the synthetic names "gcm" / sl@0: * "General_Category_Mask" to the property sl@0: * UCHAR_GENERAL_CATEGORY_MASK. These names are not in sl@0: * PropertyAliases.txt. sl@0: * sl@0: * @param alias the property name to be matched. The name is compared sl@0: * using "loose matching" as described in PropertyAliases.txt. sl@0: * sl@0: * @return a UProperty enum, or UCHAR_INVALID_CODE if the given name sl@0: * does not match any property. sl@0: * sl@0: * @see UProperty sl@0: * @stable ICU 2.4 sl@0: */ sl@0: U_STABLE UProperty U_EXPORT2 sl@0: u_getPropertyEnum(const char* alias); sl@0: sl@0: /** sl@0: * Return the Unicode name for a given property value, as given in the sl@0: * Unicode database file PropertyValueAliases.txt. sl@0: * sl@0: * Note: Some of the names in PropertyValueAliases.txt can only be sl@0: * retrieved using UCHAR_GENERAL_CATEGORY_MASK, not sl@0: * UCHAR_GENERAL_CATEGORY. These include: "C" / "Other", "L" / sl@0: * "Letter", "LC" / "Cased_Letter", "M" / "Mark", "N" / "Number", "P" sl@0: * / "Punctuation", "S" / "Symbol", and "Z" / "Separator". sl@0: * sl@0: * @param property UProperty selector constant. sl@0: * Must be UCHAR_BINARY_START<=which2<=radix<=36 or if the sl@0: * value of c is not a valid digit in the specified sl@0: * radix, -1 is returned. A character is a valid digit sl@0: * if at least one of the following is true: sl@0: *
    sl@0: *
  • The character has a decimal digit value. sl@0: * Such characters have the general category "Nd" (decimal digit numbers) sl@0: * and a Numeric_Type of Decimal. sl@0: * In this case the value is the character's decimal digit value.
  • sl@0: *
  • The character is one of the uppercase Latin letters sl@0: * 'A' through 'Z'. sl@0: * In this case the value is c-'A'+10.
  • sl@0: *
  • The character is one of the lowercase Latin letters sl@0: * 'a' through 'z'. sl@0: * In this case the value is ch-'a'+10.
  • sl@0: *
  • Latin letters from both the ASCII range (0061..007A, 0041..005A) sl@0: * as well as from the Fullwidth ASCII range (FF41..FF5A, FF21..FF3A) sl@0: * are recognized.
  • sl@0: *
sl@0: * sl@0: * Same as java.lang.Character.digit(). sl@0: * sl@0: * @param ch the code point to be tested. sl@0: * @param radix the radix. sl@0: * @return the numeric value represented by the character in the sl@0: * specified radix, sl@0: * or -1 if there is no value or if the value exceeds the radix. sl@0: * sl@0: * @see UCHAR_NUMERIC_TYPE sl@0: * @see u_forDigit sl@0: * @see u_charDigitValue sl@0: * @see u_isdigit sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE int32_t U_EXPORT2 sl@0: u_digit(UChar32 ch, int8_t radix); sl@0: sl@0: /** sl@0: * Determines the character representation for a specific digit in sl@0: * the specified radix. If the value of radix is not a sl@0: * valid radix, or the value of digit is not a valid sl@0: * digit in the specified radix, the null character sl@0: * (U+0000) is returned. sl@0: *

sl@0: * The radix argument is valid if it is greater than or sl@0: * equal to 2 and less than or equal to 36. sl@0: * The digit argument is valid if sl@0: * 0 <= digit < radix. sl@0: *

sl@0: * If the digit is less than 10, then sl@0: * '0' + digit is returned. Otherwise, the value sl@0: * 'a' + digit - 10 is returned. sl@0: * sl@0: * Same as java.lang.Character.forDigit(). sl@0: * sl@0: * @param digit the number to convert to a character. sl@0: * @param radix the radix. sl@0: * @return the char representation of the specified digit sl@0: * in the specified radix. sl@0: * sl@0: * @see u_digit sl@0: * @see u_charDigitValue sl@0: * @see u_isdigit sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE UChar32 U_EXPORT2 sl@0: u_forDigit(int32_t digit, int8_t radix); sl@0: sl@0: /** sl@0: * Get the "age" of the code point. sl@0: * The "age" is the Unicode version when the code point was first sl@0: * designated (as a non-character or for Private Use) sl@0: * or assigned a character. sl@0: * This can be useful to avoid emitting code points to receiving sl@0: * processes that do not accept newer characters. sl@0: * The data is from the UCD file DerivedAge.txt. sl@0: * sl@0: * @param c The code point. sl@0: * @param versionArray The Unicode version number array, to be filled in. sl@0: * sl@0: * @stable ICU 2.1 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_charAge(UChar32 c, UVersionInfo versionArray); sl@0: sl@0: /** sl@0: * Gets the Unicode version information. sl@0: * The version array is filled in with the version information sl@0: * for the Unicode standard that is currently used by ICU. sl@0: * For example, Unicode version 3.1.1 is represented as an array with sl@0: * the values { 3, 1, 1, 0 }. sl@0: * sl@0: * @param versionArray an output array that will be filled in with sl@0: * the Unicode version number sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_getUnicodeVersion(UVersionInfo versionArray); sl@0: sl@0: /** sl@0: * Get the FC_NFKC_Closure property string for a character. sl@0: * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" sl@0: * or for "FNC": http://www.unicode.org/reports/tr15/ sl@0: * sl@0: * @param c The character (code point) for which to get the FC_NFKC_Closure string. sl@0: * It must be 0<=c<=0x10ffff. sl@0: * @param dest Destination address for copying the string. sl@0: * The string will be zero-terminated if possible. sl@0: * If there is no FC_NFKC_Closure string, sl@0: * then the buffer will be set to the empty string. sl@0: * @param destCapacity ==sizeof(dest) sl@0: * @param pErrorCode Pointer to a UErrorCode variable. sl@0: * @return The length of the string, or 0 if there is no FC_NFKC_Closure string for this character. sl@0: * If the destCapacity is less than or equal to the length, then the buffer sl@0: * contains the truncated name and the returned length indicates the full sl@0: * length of the name. sl@0: * The length does not include the zero-termination. sl@0: * sl@0: * @stable ICU 2.2 sl@0: */ sl@0: U_STABLE int32_t U_EXPORT2 sl@0: u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); sl@0: sl@0: U_CDECL_END sl@0: sl@0: #endif /*_UCHAR*/ sl@0: /*eof*/