X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/73c04bcfe1096173b00431f0cdc742894b15eef0..b25be06635768807f8f693286fa73bb2297bb06c:/icuSources/common/unicode/uchar.h diff --git a/icuSources/common/unicode/uchar.h b/icuSources/common/unicode/uchar.h index ce5fc4f4..93aa6632 100644 --- a/icuSources/common/unicode/uchar.h +++ b/icuSources/common/unicode/uchar.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1997-2006, International Business Machines +* Copyright (C) 1997-2010, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -39,7 +39,7 @@ U_CDECL_BEGIN * @see u_getUnicodeVersion * @stable ICU 2.0 */ -#define U_UNICODE_VERSION "5.0" +#define U_UNICODE_VERSION "6.0" /** * \file @@ -56,7 +56,7 @@ U_CDECL_BEGIN * * For more information see * "About the Unicode Character Database" (http://www.unicode.org/ucd/) - * and the ICU User Guide chapter on Properties (http://icu.sourceforge.net/userguide/properties.html). + * and the ICU User Guide chapter on Properties (http://icu-project.org/userguide/properties.html). * * Many functions are designed to match java.lang.Character functions. * See the individual function documentation, @@ -321,51 +321,29 @@ typedef enum UProperty { /** Binary property NFD_Inert. ICU-specific property for characters that are inert under NFD, i.e., they do not interact with adjacent characters. - Used for example in normalizing transforms in incremental mode - to find the boundary of safely normalizable text despite possible - text additions. - - There is one such property per normalization form. - These properties are computed as follows - an inert character is: - a) unassigned, or ALL of the following: - b) of combining class 0. - c) not decomposed by this normalization form. - AND if NFC or NFKC, - d) can never compose with a previous character. - e) can never compose with a following character. - f) can never change if another character is added. - Example: a-breve might satisfy all but f, but if you - add an ogonek it changes to a-ogonek + breve - - See also com.ibm.text.UCD.NFSkippable in the ICU4J repository, - and icu/source/common/unormimp.h . + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. @stable ICU 3.0 */ UCHAR_NFD_INERT=37, /** Binary property NFKD_Inert. ICU-specific property for characters that are inert under NFKD, i.e., they do not interact with adjacent characters. - Used for example in normalizing transforms in incremental mode - to find the boundary of safely normalizable text despite possible - text additions. - @see UCHAR_NFD_INERT + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. @stable ICU 3.0 */ UCHAR_NFKD_INERT=38, /** Binary property NFC_Inert. ICU-specific property for characters that are inert under NFC, i.e., they do not interact with adjacent characters. - Used for example in normalizing transforms in incremental mode - to find the boundary of safely normalizable text despite possible - text additions. - @see UCHAR_NFD_INERT + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. @stable ICU 3.0 */ UCHAR_NFC_INERT=39, /** Binary property NFKC_Inert. ICU-specific property for characters that are inert under NFKC, i.e., they do not interact with adjacent characters. - Used for example in normalizing transforms in incremental mode - to find the boundary of safely normalizable text despite possible - text additions. - @see UCHAR_NFD_INERT + See the documentation for the Normalizer2 class and the + Normalizer2::isInert() method. @stable ICU 3.0 */ UCHAR_NFKC_INERT=40, /** Binary Property Segment_Starter. @@ -373,51 +351,65 @@ typedef enum UProperty { Unicode normalization and combining character sequences. They have ccc=0 and do not occur in non-initial position of the canonical decomposition of any character - (like " in NFD(a-umlaut) and a Jamo T in an NFD(Hangul LVT)). + (like a-umlaut in NFD and a Jamo T in an NFD(Hangul LVT)). ICU uses this property for segmenting a string for generating a set of canonically equivalent strings, e.g. for canonical closure while processing collation tailoring rules. @stable ICU 3.0 */ UCHAR_SEGMENT_STARTER=41, -#ifndef U_HIDE_DRAFT_API /** Binary property Pattern_Syntax (new in Unicode 4.1). See UAX #31 Identifier and Pattern Syntax (http://www.unicode.org/reports/tr31/) - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_PATTERN_SYNTAX=42, /** Binary property Pattern_White_Space (new in Unicode 4.1). See UAX #31 Identifier and Pattern Syntax (http://www.unicode.org/reports/tr31/) - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_PATTERN_WHITE_SPACE=43, /** Binary property alnum (a C/POSIX character class). Implemented according to the UTS #18 Annex C Standard Recommendation. See the uchar.h file documentation. - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_POSIX_ALNUM=44, /** Binary property blank (a C/POSIX character class). Implemented according to the UTS #18 Annex C Standard Recommendation. See the uchar.h file documentation. - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_POSIX_BLANK=45, /** Binary property graph (a C/POSIX character class). Implemented according to the UTS #18 Annex C Standard Recommendation. See the uchar.h file documentation. - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_POSIX_GRAPH=46, /** Binary property print (a C/POSIX character class). Implemented according to the UTS #18 Annex C Standard Recommendation. See the uchar.h file documentation. - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_POSIX_PRINT=47, /** Binary property xdigit (a C/POSIX character class). Implemented according to the UTS #18 Annex C Standard Recommendation. See the uchar.h file documentation. - @draft ICU 3.4 */ + @stable ICU 3.4 */ UCHAR_POSIX_XDIGIT=48, -#endif /* U_HIDE_DRAFT_API */ + /** Binary property Cased. For Lowercase, Uppercase and Titlecase characters. @stable ICU 4.4 */ + UCHAR_CASED=49, + /** Binary property Case_Ignorable. Used in context-sensitive case mappings. @stable ICU 4.4 */ + UCHAR_CASE_IGNORABLE=50, + /** Binary property Changes_When_Lowercased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_LOWERCASED=51, + /** Binary property Changes_When_Uppercased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_UPPERCASED=52, + /** Binary property Changes_When_Titlecased. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_TITLECASED=53, + /** Binary property Changes_When_Casefolded. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_CASEFOLDED=54, + /** Binary property Changes_When_Casemapped. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_CASEMAPPED=55, + /** Binary property Changes_When_NFKC_Casefolded. @stable ICU 4.4 */ + UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED=56, /** One more than the last constant for binary Unicode properties. @stable ICU 2.1 */ - UCHAR_BINARY_LIMIT=49, + UCHAR_BINARY_LIMIT=57, /** Enumerated property Bidi_Class. Same as u_charDirection, returns UCharDirection values. @stable ICU 2.2 */ @@ -484,23 +476,21 @@ typedef enum UProperty { see UNORM_FCD and http://www.unicode.org/notes/tn5/#FCD . Returns 8-bit numeric values like UCHAR_CANONICAL_COMBINING_CLASS. @stable ICU 3.0 */ UCHAR_TRAIL_CANONICAL_COMBINING_CLASS=0x1011, -#ifndef U_HIDE_DRAFT_API /** Enumerated property Grapheme_Cluster_Break (new in Unicode 4.1). Used in UAX #29: Text Boundaries (http://www.unicode.org/reports/tr29/) - Returns UGraphemeClusterBreak values. @draft ICU 3.4 */ + Returns UGraphemeClusterBreak values. @stable ICU 3.4 */ UCHAR_GRAPHEME_CLUSTER_BREAK=0x1012, /** Enumerated property Sentence_Break (new in Unicode 4.1). Used in UAX #29: Text Boundaries (http://www.unicode.org/reports/tr29/) - Returns USentenceBreak values. @draft ICU 3.4 */ + Returns USentenceBreak values. @stable ICU 3.4 */ UCHAR_SENTENCE_BREAK=0x1013, /** Enumerated property Word_Break (new in Unicode 4.1). Used in UAX #29: Text Boundaries (http://www.unicode.org/reports/tr29/) - Returns UWordBreakValues values. @draft ICU 3.4 */ + Returns UWordBreakValues values. @stable ICU 3.4 */ UCHAR_WORD_BREAK=0x1014, -#endif /*U_HIDE_DRAFT_API*/ /** One more than the last constant for enumerated/integer Unicode properties. @stable ICU 2.2 */ UCHAR_INT_LIMIT=0x1015, @@ -570,6 +560,20 @@ typedef enum UProperty { /** One more than the last constant for string Unicode properties. @stable ICU 2.4 */ UCHAR_STRING_LIMIT=0x400D, + /** Provisional property Script_Extensions (new in Unicode 6.0). + As a provisional property, it may be modified or removed + in future versions of the Unicode Standard, and thus in ICU. + Some characters are commonly used in multiple scripts. + For more information, see UAX #24: http://www.unicode.org/reports/tr24/. + Corresponds to uscript_hasScript and uscript_getScriptExtensions in uscript.h. + @draft ICU 4.6 */ + UCHAR_SCRIPT_EXTENSIONS=0x7000, + /** First constant for Unicode properties with unusual value types. @draft ICU 4.6 */ + UCHAR_OTHER_PROPERTY_START=UCHAR_SCRIPT_EXTENSIONS, + /** One more than the last constant for Unicode properties with unusual value types. + * @draft ICU 4.6 */ + UCHAR_OTHER_PROPERTY_LIMIT=0x7001, + /** Represents a nonexistent or invalid property or property value. @stable ICU 2.4 */ UCHAR_INVALID_CODE = -1 } UProperty; @@ -1194,75 +1198,191 @@ enum UBlockCode { /** @stable ICU 2.6 */ UBLOCK_VARIATION_SELECTORS_SUPPLEMENT = 125, /*[E0100]*/ -#ifndef U_HIDE_DRAFT_API /* New blocks in Unicode 4.1 */ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_ANCIENT_GREEK_MUSICAL_NOTATION = 126, /*[1D200]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_ANCIENT_GREEK_NUMBERS = 127, /*[10140]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_ARABIC_SUPPLEMENT = 128, /*[0750]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_BUGINESE = 129, /*[1A00]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_CJK_STROKES = 130, /*[31C0]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = 131, /*[1DC0]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_COPTIC = 132, /*[2C80]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_ETHIOPIC_EXTENDED = 133, /*[2D80]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_ETHIOPIC_SUPPLEMENT = 134, /*[1380]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_GEORGIAN_SUPPLEMENT = 135, /*[2D00]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_GLAGOLITIC = 136, /*[2C00]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_KHAROSHTHI = 137, /*[10A00]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_MODIFIER_TONE_LETTERS = 138, /*[A700]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_NEW_TAI_LUE = 139, /*[1980]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_OLD_PERSIAN = 140, /*[103A0]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_PHONETIC_EXTENSIONS_SUPPLEMENT = 141, /*[1D80]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_SUPPLEMENTAL_PUNCTUATION = 142, /*[2E00]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_SYLOTI_NAGRI = 143, /*[A800]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_TIFINAGH = 144, /*[2D30]*/ - /** @draft ICU 3.4 */ + /** @stable ICU 3.4 */ UBLOCK_VERTICAL_FORMS = 145, /*[FE10]*/ /* New blocks in Unicode 5.0 */ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_NKO = 146, /*[07C0]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_BALINESE = 147, /*[1B00]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_LATIN_EXTENDED_C = 148, /*[2C60]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_LATIN_EXTENDED_D = 149, /*[A720]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_PHAGS_PA = 150, /*[A840]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_PHOENICIAN = 151, /*[10900]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_CUNEIFORM = 152, /*[12000]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_CUNEIFORM_NUMBERS_AND_PUNCTUATION = 153, /*[12400]*/ - /** @draft ICU 3.6 */ + /** @stable ICU 3.6 */ UBLOCK_COUNTING_ROD_NUMERALS = 154, /*[1D360]*/ -#endif /*U_HIDE_DRAFT_API*/ - - /** @stable ICU 2.0 */ - UBLOCK_COUNT = 155, + /* New blocks in Unicode 5.1 */ + + /** @stable ICU 4.0 */ + UBLOCK_SUNDANESE = 155, /*[1B80]*/ + /** @stable ICU 4.0 */ + UBLOCK_LEPCHA = 156, /*[1C00]*/ + /** @stable ICU 4.0 */ + UBLOCK_OL_CHIKI = 157, /*[1C50]*/ + /** @stable ICU 4.0 */ + UBLOCK_CYRILLIC_EXTENDED_A = 158, /*[2DE0]*/ + /** @stable ICU 4.0 */ + UBLOCK_VAI = 159, /*[A500]*/ + /** @stable ICU 4.0 */ + UBLOCK_CYRILLIC_EXTENDED_B = 160, /*[A640]*/ + /** @stable ICU 4.0 */ + UBLOCK_SAURASHTRA = 161, /*[A880]*/ + /** @stable ICU 4.0 */ + UBLOCK_KAYAH_LI = 162, /*[A900]*/ + /** @stable ICU 4.0 */ + UBLOCK_REJANG = 163, /*[A930]*/ + /** @stable ICU 4.0 */ + UBLOCK_CHAM = 164, /*[AA00]*/ + /** @stable ICU 4.0 */ + UBLOCK_ANCIENT_SYMBOLS = 165, /*[10190]*/ + /** @stable ICU 4.0 */ + UBLOCK_PHAISTOS_DISC = 166, /*[101D0]*/ + /** @stable ICU 4.0 */ + UBLOCK_LYCIAN = 167, /*[10280]*/ + /** @stable ICU 4.0 */ + UBLOCK_CARIAN = 168, /*[102A0]*/ + /** @stable ICU 4.0 */ + UBLOCK_LYDIAN = 169, /*[10920]*/ + /** @stable ICU 4.0 */ + UBLOCK_MAHJONG_TILES = 170, /*[1F000]*/ + /** @stable ICU 4.0 */ + UBLOCK_DOMINO_TILES = 171, /*[1F030]*/ + + /* New blocks in Unicode 5.2 */ + + /** @stable ICU 4.4 */ + UBLOCK_SAMARITAN = 172, /*[0800]*/ + /** @stable ICU 4.4 */ + UBLOCK_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = 173, /*[18B0]*/ + /** @stable ICU 4.4 */ + UBLOCK_TAI_THAM = 174, /*[1A20]*/ + /** @stable ICU 4.4 */ + UBLOCK_VEDIC_EXTENSIONS = 175, /*[1CD0]*/ + /** @stable ICU 4.4 */ + UBLOCK_LISU = 176, /*[A4D0]*/ + /** @stable ICU 4.4 */ + UBLOCK_BAMUM = 177, /*[A6A0]*/ + /** @stable ICU 4.4 */ + UBLOCK_COMMON_INDIC_NUMBER_FORMS = 178, /*[A830]*/ + /** @stable ICU 4.4 */ + UBLOCK_DEVANAGARI_EXTENDED = 179, /*[A8E0]*/ + /** @stable ICU 4.4 */ + UBLOCK_HANGUL_JAMO_EXTENDED_A = 180, /*[A960]*/ + /** @stable ICU 4.4 */ + UBLOCK_JAVANESE = 181, /*[A980]*/ + /** @stable ICU 4.4 */ + UBLOCK_MYANMAR_EXTENDED_A = 182, /*[AA60]*/ + /** @stable ICU 4.4 */ + UBLOCK_TAI_VIET = 183, /*[AA80]*/ + /** @stable ICU 4.4 */ + UBLOCK_MEETEI_MAYEK = 184, /*[ABC0]*/ + /** @stable ICU 4.4 */ + UBLOCK_HANGUL_JAMO_EXTENDED_B = 185, /*[D7B0]*/ + /** @stable ICU 4.4 */ + UBLOCK_IMPERIAL_ARAMAIC = 186, /*[10840]*/ + /** @stable ICU 4.4 */ + UBLOCK_OLD_SOUTH_ARABIAN = 187, /*[10A60]*/ + /** @stable ICU 4.4 */ + UBLOCK_AVESTAN = 188, /*[10B00]*/ + /** @stable ICU 4.4 */ + UBLOCK_INSCRIPTIONAL_PARTHIAN = 189, /*[10B40]*/ + /** @stable ICU 4.4 */ + UBLOCK_INSCRIPTIONAL_PAHLAVI = 190, /*[10B60]*/ + /** @stable ICU 4.4 */ + UBLOCK_OLD_TURKIC = 191, /*[10C00]*/ + /** @stable ICU 4.4 */ + UBLOCK_RUMI_NUMERAL_SYMBOLS = 192, /*[10E60]*/ + /** @stable ICU 4.4 */ + UBLOCK_KAITHI = 193, /*[11080]*/ + /** @stable ICU 4.4 */ + UBLOCK_EGYPTIAN_HIEROGLYPHS = 194, /*[13000]*/ + /** @stable ICU 4.4 */ + UBLOCK_ENCLOSED_ALPHANUMERIC_SUPPLEMENT = 195, /*[1F100]*/ + /** @stable ICU 4.4 */ + UBLOCK_ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = 196, /*[1F200]*/ + /** @stable ICU 4.4 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = 197, /*[2A700]*/ + + /* New blocks in Unicode 6.0 */ + + /** @stable ICU 4.6 */ + UBLOCK_MANDAIC = 198, /*[0840]*/ + /** @stable ICU 4.6 */ + UBLOCK_BATAK = 199, /*[1BC0]*/ + /** @stable ICU 4.6 */ + UBLOCK_ETHIOPIC_EXTENDED_A = 200, /*[AB00]*/ + /** @stable ICU 4.6 */ + UBLOCK_BRAHMI = 201, /*[11000]*/ + /** @stable ICU 4.6 */ + UBLOCK_BAMUM_SUPPLEMENT = 202, /*[16800]*/ + /** @stable ICU 4.6 */ + UBLOCK_KANA_SUPPLEMENT = 203, /*[1B000]*/ + /** @stable ICU 4.6 */ + UBLOCK_PLAYING_CARDS = 204, /*[1F0A0]*/ + /** @stable ICU 4.6 */ + UBLOCK_MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = 205, /*[1F300]*/ + /** @stable ICU 4.6 */ + UBLOCK_EMOTICONS = 206, /*[1F600]*/ + /** @stable ICU 4.6 */ + UBLOCK_TRANSPORT_AND_MAP_SYMBOLS = 207, /*[1F680]*/ + /** @stable ICU 4.6 */ + UBLOCK_ALCHEMICAL_SYMBOLS = 208, /*[1F700]*/ + /** @stable ICU 4.6 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = 209, /*[2B740]*/ + + /** @stable ICU 2.0 */ + UBLOCK_COUNT = 210, /** @stable ICU 2.0 */ UBLOCK_INVALID_CODE=-1 @@ -1307,6 +1427,7 @@ typedef enum UCharNameChoice { U_UNICODE_CHAR_NAME, U_UNICODE_10_CHAR_NAME, U_EXTENDED_CHAR_NAME, + U_CHAR_NAME_ALIAS, /**< Corrected name from NameAliases.txt. @stable ICU 4.4 */ U_CHAR_NAME_CHOICE_COUNT } UCharNameChoice; @@ -1394,7 +1515,8 @@ typedef enum UJoiningGroup { U_JG_GAF, U_JG_GAMAL, U_JG_HAH, - U_JG_HAMZA_ON_HEH_GOAL, + U_JG_TEH_MARBUTA_GOAL, /**< @stable ICU 4.6 */ + U_JG_HAMZA_ON_HEH_GOAL=U_JG_TEH_MARBUTA_GOAL, U_JG_HE, U_JG_HEH, U_JG_HEH_GOAL, @@ -1434,6 +1556,9 @@ typedef enum UJoiningGroup { U_JG_FE, /**< @stable ICU 2.6 */ U_JG_KHAPH, /**< @stable ICU 2.6 */ U_JG_ZHAIN, /**< @stable ICU 2.6 */ + U_JG_BURUSHASKI_YEH_BARREE, /**< @stable ICU 4.0 */ + U_JG_FARSI_YEH, /**< @stable ICU 4.4 */ + U_JG_NYA, /**< @stable ICU 4.4 */ U_JG_COUNT } UJoiningGroup; @@ -1441,10 +1566,9 @@ typedef enum UJoiningGroup { * Grapheme Cluster Break constants. * * @see UCHAR_GRAPHEME_CLUSTER_BREAK - * @draft ICU 3.4 + * @stable ICU 3.4 */ typedef enum UGraphemeClusterBreak { -#ifndef U_HIDE_DRAFT_API U_GCB_OTHER = 0, /*[XX]*/ /*See note !!*/ U_GCB_CONTROL = 1, /*[CN]*/ U_GCB_CR = 2, /*[CR]*/ @@ -1455,8 +1579,9 @@ typedef enum UGraphemeClusterBreak { U_GCB_LVT = 7, /*[LVT]*/ U_GCB_T = 8, /*[T]*/ U_GCB_V = 9, /*[V]*/ -#endif /*U_HIDE_DRAFT_API*/ - U_GCB_COUNT = 10 + U_GCB_SPACING_MARK = 10, /*[SM]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + U_GCB_PREPEND = 11, /*[PP]*/ + U_GCB_COUNT = 12 } UGraphemeClusterBreak; /** @@ -1464,10 +1589,9 @@ typedef enum UGraphemeClusterBreak { * (UWordBreak is a pre-existing enum type in ubrk.h for word break status tags.) * * @see UCHAR_WORD_BREAK - * @draft ICU 3.4 + * @stable ICU 3.4 */ typedef enum UWordBreakValues { -#ifndef U_HIDE_DRAFT_API U_WB_OTHER = 0, /*[XX]*/ /*See note !!*/ U_WB_ALETTER = 1, /*[LE]*/ U_WB_FORMAT = 2, /*[FO]*/ @@ -1476,18 +1600,21 @@ typedef enum UWordBreakValues { U_WB_MIDNUM = 5, /*[MN]*/ U_WB_NUMERIC = 6, /*[NU]*/ U_WB_EXTENDNUMLET = 7, /*[EX]*/ -#endif /*U_HIDE_DRAFT_API*/ - U_WB_COUNT = 8 + U_WB_CR = 8, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + U_WB_EXTEND = 9, /*[Extend]*/ + U_WB_LF = 10, /*[LF]*/ + U_WB_MIDNUMLET =11, /*[MB]*/ + U_WB_NEWLINE =12, /*[NL]*/ + U_WB_COUNT = 13 } UWordBreakValues; /** * Sentence Break constants. * * @see UCHAR_SENTENCE_BREAK - * @draft ICU 3.4 + * @stable ICU 3.4 */ typedef enum USentenceBreak { -#ifndef U_HIDE_DRAFT_API U_SB_OTHER = 0, /*[XX]*/ /*See note !!*/ U_SB_ATERM = 1, /*[AT]*/ U_SB_CLOSE = 2, /*[CL]*/ @@ -1498,9 +1625,12 @@ typedef enum USentenceBreak { U_SB_SEP = 7, /*[SE]*/ U_SB_SP = 8, /*[SP]*/ U_SB_STERM = 9, /*[ST]*/ - U_SB_UPPER = 10, /*[UP]*/ -#endif /*U_HIDE_DRAFT_API*/ - U_SB_COUNT = 11 + U_SB_UPPER = 10, /*[UP]*/ + U_SB_CR = 11, /*[CR]*/ /* from here on: new in Unicode 5.1/ICU 4.0 */ + U_SB_EXTEND = 12, /*[EX]*/ + U_SB_LF = 13, /*[LF]*/ + U_SB_SCONTINUE = 14, /*[SC]*/ + U_SB_COUNT = 15 } USentenceBreak; /** @@ -1548,7 +1678,8 @@ typedef enum ULineBreak { U_LB_JL = 33, /*[JL]*/ U_LB_JT = 34, /*[JT]*/ U_LB_JV = 35, /*[JV]*/ - U_LB_COUNT = 36 + U_LB_CLOSE_PARENTHESIS = 36, /*[CP]*/ /* new in Unicode 5.2/ICU 4.4 */ + U_LB_COUNT = 37 } ULineBreak; /** @@ -2090,8 +2221,8 @@ u_isJavaSpaceChar(UChar32 c); * A character is considered to be a Java whitespace character if and only * if it satisfies one of the following criteria: * - * - It is a Unicode separator (categories "Z"), but is not - * a no-break space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). + * - It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not + * also a non-breaking space (U+00A0 NBSP or U+2007 Figure Space or U+202F Narrow NBSP). * - It is U+0009 HORIZONTAL TABULATION. * - It is U+000A LINE FEED. * - It is U+000B VERTICAL TABULATION. @@ -2101,9 +2232,15 @@ u_isJavaSpaceChar(UChar32 c); * - It is U+001D GROUP SEPARATOR. * - It is U+001E RECORD SEPARATOR. * - It is U+001F UNIT SEPARATOR. - * - It is U+0085 NEXT LINE. * - * Same as java.lang.Character.isWhitespace() except that Java omits U+0085. + * This API tries to sync with the semantics of Java's + * java.lang.Character.isWhitespace(), but it may not return + * the exact same results because of the Unicode version + * difference. + * + * Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs) + * to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false. + * See http://www.unicode.org/versions/Unicode4.0.1/ * * Note: There are several ICU whitespace functions; please see the uchar.h * file documentation for a detailed comparison. @@ -2421,6 +2558,9 @@ u_charName(UChar32 code, UCharNameChoice nameChoice, * The ISO 10646 comment is an informative field in the Unicode Character * Database (UnicodeData.txt field 11) and is from the ISO 10646 names list. * + * Note: Unicode 5.2 removes all ISO comment data, resulting in empty strings + * returned for all characters. + * * @param c The character (code point) for which to get the ISO comment. * It must be 0<=c<=0x10ffff. * @param dest Destination address for copying the comment. @@ -2651,7 +2791,7 @@ u_getPropertyValueName(UProperty property, * * @return a value integer or UCHAR_INVALID_CODE if the given name * does not match any value of the given property, or if the - * property is invalid. Note: U CHAR_GENERAL_CATEGORY values + * property is invalid. Note: UCHAR_GENERAL_CATEGORY_MASK values * are not values of UCharCategory, but rather mask values * produced by U_GET_GC_MASK(). This allows grouped * categories such as [:L:] to be represented. @@ -2713,11 +2853,9 @@ u_isIDPart(UChar32 c); * according to Java. * True for characters with general category "Cf" (format controls) as well as * non-whitespace ISO controls - * (U+0000..U+0008, U+000E..U+001B, U+007F..U+0084, U+0086..U+009F). + * (U+0000..U+0008, U+000E..U+001B, U+007F..U+009F). * - * Same as java.lang.Character.isIdentifierIgnorable() - * except that Java also returns TRUE for U+0085 Next Line - * (it omits U+0085 from whitespace ISO controls). + * Same as java.lang.Character.isIdentifierIgnorable(). * * Note that Unicode just recommends to ignore Cf (format controls). * @@ -2787,7 +2925,7 @@ u_isJavaIDPart(UChar32 c); * Full case mappings are applied by the string case mapping functions, * see ustring.h and the UnicodeString class. * See also the User Guide chapter on C/POSIX migration: - * http://icu.sourceforge.net/userguide/posix.html#case_mappings + * http://icu-project.org/userguide/posix.html#case_mappings * * @param c the code point to be mapped * @return the Simple_Lowercase_Mapping of the code point, if any; @@ -2812,7 +2950,7 @@ u_tolower(UChar32 c); * Full case mappings are applied by the string case mapping functions, * see ustring.h and the UnicodeString class. * See also the User Guide chapter on C/POSIX migration: - * http://icu.sourceforge.net/userguide/posix.html#case_mappings + * http://icu-project.org/userguide/posix.html#case_mappings * * @param c the code point to be mapped * @return the Simple_Uppercase_Mapping of the code point, if any; @@ -2837,7 +2975,7 @@ u_toupper(UChar32 c); * Full case mappings are applied by the string case mapping functions, * see ustring.h and the UnicodeString class. * See also the User Guide chapter on C/POSIX migration: - * http://icu.sourceforge.net/userguide/posix.html#case_mappings + * http://icu-project.org/userguide/posix.html#case_mappings * * @param c the code point to be mapped * @return the Simple_Titlecase_Mapping of the code point, if any; @@ -2882,7 +3020,7 @@ u_totitle(UChar32 c); * Full case mappings are applied by the string case mapping functions, * see ustring.h and the UnicodeString class. * See also the User Guide chapter on C/POSIX migration: - * http://icu.sourceforge.net/userguide/posix.html#case_mappings + * http://icu-project.org/userguide/posix.html#case_mappings * * @param c the code point to be mapped * @param options Either U_FOLD_CASE_DEFAULT or U_FOLD_CASE_EXCLUDE_SPECIAL_I @@ -2996,6 +3134,7 @@ u_charAge(UChar32 c, UVersionInfo versionArray); U_STABLE void U_EXPORT2 u_getUnicodeVersion(UVersionInfo versionArray); +#if !UCONFIG_NO_NORMALIZATION /** * Get the FC_NFKC_Closure property string for a character. * See Unicode Standard Annex #15 for details, search for "FC_NFKC_Closure" @@ -3020,6 +3159,9 @@ u_getUnicodeVersion(UVersionInfo versionArray); U_STABLE int32_t U_EXPORT2 u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *pErrorCode); +#endif + + U_CDECL_END #endif /*_UCHAR*/