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

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

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