]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
46f4442e | 2 | ********************************************************************** |
51004dcb | 3 | * Copyright (C) 1997-2013, International Business Machines |
46f4442e A |
4 | * Corporation and others. All Rights Reserved. |
5 | ********************************************************************** | |
6 | * | |
7 | * File USCRIPT.H | |
8 | * | |
9 | * Modification History: | |
10 | * | |
11 | * Date Name Description | |
12 | * 07/06/2001 Ram Creation. | |
13 | ****************************************************************************** | |
14 | */ | |
15 | ||
b75a7d8f A |
16 | #ifndef USCRIPT_H |
17 | #define USCRIPT_H | |
374ca955 | 18 | #include "unicode/utypes.h" |
b75a7d8f A |
19 | |
20 | /** | |
73c04bcf A |
21 | * \file |
22 | * \brief C API: Unicode Script Information | |
23 | */ | |
24 | ||
25 | /** | |
26 | * Constants for ISO 15924 script codes. | |
27 | * | |
28 | * Many of these script codes - those from Unicode's ScriptNames.txt - | |
29 | * are character property values for Unicode's Script property. | |
30 | * See UAX #24 Script Names (http://www.unicode.org/reports/tr24/). | |
31 | * | |
32 | * Starting with ICU 3.6, constants for most ISO 15924 script codes | |
33 | * are included (currently excluding private-use codes Qaaa..Qabx). | |
34 | * For scripts for which there are codes in ISO 15924 but which are not | |
35 | * used in the Unicode Character Database (UCD), there are no Unicode characters | |
36 | * associated with those scripts. | |
37 | * | |
38 | * For example, there are no characters that have a UCD script code of | |
39 | * Hans or Hant. All Han ideographs have the Hani script code. | |
40 | * The Hans and Hant script codes are used with CLDR data. | |
41 | * | |
42 | * ISO 15924 script codes are included for use with CLDR and similar. | |
b75a7d8f | 43 | * |
374ca955 | 44 | * @stable ICU 2.2 |
b75a7d8f A |
45 | */ |
46 | typedef enum UScriptCode { | |
4388f060 A |
47 | /* |
48 | * Note: UScriptCode constants and their ISO script code comments | |
49 | * are parsed by preparseucd.py. | |
50 | * It matches lines like | |
51 | * USCRIPT_<Unicode Script value name> = <integer>, / * <ISO script code> * / | |
52 | */ | |
53 | ||
54 | /** @stable ICU 2.2 */ | |
b75a7d8f | 55 | USCRIPT_INVALID_CODE = -1, |
4388f060 | 56 | /** @stable ICU 2.2 */ |
729e4ab9 | 57 | USCRIPT_COMMON = 0, /* Zyyy */ |
4388f060 | 58 | /** @stable ICU 2.2 */ |
729e4ab9 | 59 | USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */ |
4388f060 | 60 | /** @stable ICU 2.2 */ |
b75a7d8f | 61 | USCRIPT_ARABIC = 2, /* Arab */ |
4388f060 | 62 | /** @stable ICU 2.2 */ |
b75a7d8f | 63 | USCRIPT_ARMENIAN = 3, /* Armn */ |
4388f060 | 64 | /** @stable ICU 2.2 */ |
b75a7d8f | 65 | USCRIPT_BENGALI = 4, /* Beng */ |
4388f060 | 66 | /** @stable ICU 2.2 */ |
b75a7d8f | 67 | USCRIPT_BOPOMOFO = 5, /* Bopo */ |
4388f060 | 68 | /** @stable ICU 2.2 */ |
b75a7d8f | 69 | USCRIPT_CHEROKEE = 6, /* Cher */ |
4388f060 | 70 | /** @stable ICU 2.2 */ |
374ca955 | 71 | USCRIPT_COPTIC = 7, /* Copt */ |
4388f060 | 72 | /** @stable ICU 2.2 */ |
73c04bcf | 73 | USCRIPT_CYRILLIC = 8, /* Cyrl */ |
4388f060 | 74 | /** @stable ICU 2.2 */ |
b75a7d8f | 75 | USCRIPT_DESERET = 9, /* Dsrt */ |
4388f060 | 76 | /** @stable ICU 2.2 */ |
b75a7d8f | 77 | USCRIPT_DEVANAGARI = 10, /* Deva */ |
4388f060 | 78 | /** @stable ICU 2.2 */ |
b75a7d8f | 79 | USCRIPT_ETHIOPIC = 11, /* Ethi */ |
4388f060 | 80 | /** @stable ICU 2.2 */ |
73c04bcf | 81 | USCRIPT_GEORGIAN = 12, /* Geor */ |
4388f060 | 82 | /** @stable ICU 2.2 */ |
b75a7d8f | 83 | USCRIPT_GOTHIC = 13, /* Goth */ |
4388f060 | 84 | /** @stable ICU 2.2 */ |
b75a7d8f | 85 | USCRIPT_GREEK = 14, /* Grek */ |
4388f060 | 86 | /** @stable ICU 2.2 */ |
b75a7d8f | 87 | USCRIPT_GUJARATI = 15, /* Gujr */ |
4388f060 | 88 | /** @stable ICU 2.2 */ |
b75a7d8f | 89 | USCRIPT_GURMUKHI = 16, /* Guru */ |
4388f060 | 90 | /** @stable ICU 2.2 */ |
b75a7d8f | 91 | USCRIPT_HAN = 17, /* Hani */ |
4388f060 | 92 | /** @stable ICU 2.2 */ |
b75a7d8f | 93 | USCRIPT_HANGUL = 18, /* Hang */ |
4388f060 | 94 | /** @stable ICU 2.2 */ |
b75a7d8f | 95 | USCRIPT_HEBREW = 19, /* Hebr */ |
4388f060 | 96 | /** @stable ICU 2.2 */ |
b75a7d8f | 97 | USCRIPT_HIRAGANA = 20, /* Hira */ |
4388f060 | 98 | /** @stable ICU 2.2 */ |
b75a7d8f | 99 | USCRIPT_KANNADA = 21, /* Knda */ |
4388f060 | 100 | /** @stable ICU 2.2 */ |
b75a7d8f | 101 | USCRIPT_KATAKANA = 22, /* Kana */ |
4388f060 | 102 | /** @stable ICU 2.2 */ |
b75a7d8f | 103 | USCRIPT_KHMER = 23, /* Khmr */ |
4388f060 | 104 | /** @stable ICU 2.2 */ |
b75a7d8f | 105 | USCRIPT_LAO = 24, /* Laoo */ |
4388f060 | 106 | /** @stable ICU 2.2 */ |
73c04bcf | 107 | USCRIPT_LATIN = 25, /* Latn */ |
4388f060 | 108 | /** @stable ICU 2.2 */ |
b75a7d8f | 109 | USCRIPT_MALAYALAM = 26, /* Mlym */ |
4388f060 | 110 | /** @stable ICU 2.2 */ |
b75a7d8f | 111 | USCRIPT_MONGOLIAN = 27, /* Mong */ |
4388f060 | 112 | /** @stable ICU 2.2 */ |
b75a7d8f | 113 | USCRIPT_MYANMAR = 28, /* Mymr */ |
4388f060 | 114 | /** @stable ICU 2.2 */ |
b75a7d8f | 115 | USCRIPT_OGHAM = 29, /* Ogam */ |
4388f060 | 116 | /** @stable ICU 2.2 */ |
b75a7d8f | 117 | USCRIPT_OLD_ITALIC = 30, /* Ital */ |
4388f060 | 118 | /** @stable ICU 2.2 */ |
b75a7d8f | 119 | USCRIPT_ORIYA = 31, /* Orya */ |
4388f060 | 120 | /** @stable ICU 2.2 */ |
b75a7d8f | 121 | USCRIPT_RUNIC = 32, /* Runr */ |
4388f060 | 122 | /** @stable ICU 2.2 */ |
b75a7d8f | 123 | USCRIPT_SINHALA = 33, /* Sinh */ |
4388f060 | 124 | /** @stable ICU 2.2 */ |
73c04bcf | 125 | USCRIPT_SYRIAC = 34, /* Syrc */ |
4388f060 | 126 | /** @stable ICU 2.2 */ |
b75a7d8f | 127 | USCRIPT_TAMIL = 35, /* Taml */ |
4388f060 | 128 | /** @stable ICU 2.2 */ |
b75a7d8f | 129 | USCRIPT_TELUGU = 36, /* Telu */ |
4388f060 | 130 | /** @stable ICU 2.2 */ |
b75a7d8f | 131 | USCRIPT_THAANA = 37, /* Thaa */ |
4388f060 | 132 | /** @stable ICU 2.2 */ |
b75a7d8f | 133 | USCRIPT_THAI = 38, /* Thai */ |
4388f060 | 134 | /** @stable ICU 2.2 */ |
b75a7d8f | 135 | USCRIPT_TIBETAN = 39, /* Tibt */ |
374ca955 | 136 | /** Canadian_Aboriginal script. @stable ICU 2.6 */ |
b75a7d8f | 137 | USCRIPT_CANADIAN_ABORIGINAL = 40, /* Cans */ |
374ca955 | 138 | /** Canadian_Aboriginal script (alias). @stable ICU 2.2 */ |
b75a7d8f | 139 | USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL, |
4388f060 | 140 | /** @stable ICU 2.2 */ |
b75a7d8f | 141 | USCRIPT_YI = 41, /* Yiii */ |
4388f060 A |
142 | /* New scripts in Unicode 3.2 */ |
143 | /** @stable ICU 2.2 */ | |
b75a7d8f | 144 | USCRIPT_TAGALOG = 42, /* Tglg */ |
4388f060 | 145 | /** @stable ICU 2.2 */ |
b75a7d8f | 146 | USCRIPT_HANUNOO = 43, /* Hano */ |
4388f060 | 147 | /** @stable ICU 2.2 */ |
b75a7d8f | 148 | USCRIPT_BUHID = 44, /* Buhd */ |
4388f060 | 149 | /** @stable ICU 2.2 */ |
b75a7d8f A |
150 | USCRIPT_TAGBANWA = 45, /* Tagb */ |
151 | ||
4388f060 A |
152 | /* New scripts in Unicode 4 */ |
153 | /** @stable ICU 2.6 */ | |
73c04bcf | 154 | USCRIPT_BRAILLE = 46, /* Brai */ |
4388f060 | 155 | /** @stable ICU 2.6 */ |
73c04bcf | 156 | USCRIPT_CYPRIOT = 47, /* Cprt */ |
4388f060 | 157 | /** @stable ICU 2.6 */ |
73c04bcf | 158 | USCRIPT_LIMBU = 48, /* Limb */ |
4388f060 | 159 | /** @stable ICU 2.6 */ |
73c04bcf | 160 | USCRIPT_LINEAR_B = 49, /* Linb */ |
4388f060 | 161 | /** @stable ICU 2.6 */ |
73c04bcf | 162 | USCRIPT_OSMANYA = 50, /* Osma */ |
4388f060 | 163 | /** @stable ICU 2.6 */ |
73c04bcf | 164 | USCRIPT_SHAVIAN = 51, /* Shaw */ |
4388f060 | 165 | /** @stable ICU 2.6 */ |
73c04bcf | 166 | USCRIPT_TAI_LE = 52, /* Tale */ |
4388f060 | 167 | /** @stable ICU 2.6 */ |
73c04bcf | 168 | USCRIPT_UGARITIC = 53, /* Ugar */ |
b75a7d8f | 169 | |
73c04bcf A |
170 | /** New script code in Unicode 4.0.1 @stable ICU 3.0 */ |
171 | USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */ | |
729e4ab9 | 172 | |
4388f060 A |
173 | /* New scripts in Unicode 4.1 */ |
174 | /** @stable ICU 3.4 */ | |
73c04bcf | 175 | USCRIPT_BUGINESE = 55, /* Bugi */ |
4388f060 | 176 | /** @stable ICU 3.4 */ |
73c04bcf | 177 | USCRIPT_GLAGOLITIC = 56, /* Glag */ |
4388f060 | 178 | /** @stable ICU 3.4 */ |
73c04bcf | 179 | USCRIPT_KHAROSHTHI = 57, /* Khar */ |
4388f060 | 180 | /** @stable ICU 3.4 */ |
73c04bcf | 181 | USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */ |
4388f060 | 182 | /** @stable ICU 3.4 */ |
73c04bcf | 183 | USCRIPT_NEW_TAI_LUE = 59, /* Talu */ |
4388f060 | 184 | /** @stable ICU 3.4 */ |
73c04bcf | 185 | USCRIPT_TIFINAGH = 60, /* Tfng */ |
4388f060 | 186 | /** @stable ICU 3.4 */ |
73c04bcf | 187 | USCRIPT_OLD_PERSIAN = 61, /* Xpeo */ |
374ca955 | 188 | |
4388f060 A |
189 | /* New script codes from ISO 15924 */ |
190 | /** @stable ICU 3.6 */ | |
73c04bcf | 191 | USCRIPT_BALINESE = 62, /* Bali */ |
4388f060 | 192 | /** @stable ICU 3.6 */ |
73c04bcf | 193 | USCRIPT_BATAK = 63, /* Batk */ |
4388f060 | 194 | /** @stable ICU 3.6 */ |
73c04bcf | 195 | USCRIPT_BLISSYMBOLS = 64, /* Blis */ |
4388f060 | 196 | /** @stable ICU 3.6 */ |
73c04bcf | 197 | USCRIPT_BRAHMI = 65, /* Brah */ |
4388f060 | 198 | /** @stable ICU 3.6 */ |
73c04bcf | 199 | USCRIPT_CHAM = 66, /* Cham */ |
4388f060 | 200 | /** @stable ICU 3.6 */ |
73c04bcf | 201 | USCRIPT_CIRTH = 67, /* Cirt */ |
4388f060 | 202 | /** @stable ICU 3.6 */ |
73c04bcf | 203 | USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC = 68, /* Cyrs */ |
4388f060 | 204 | /** @stable ICU 3.6 */ |
73c04bcf | 205 | USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */ |
4388f060 | 206 | /** @stable ICU 3.6 */ |
73c04bcf | 207 | USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */ |
4388f060 | 208 | /** @stable ICU 3.6 */ |
73c04bcf | 209 | USCRIPT_EGYPTIAN_HIEROGLYPHS = 71, /* Egyp */ |
4388f060 | 210 | /** @stable ICU 3.6 */ |
73c04bcf | 211 | USCRIPT_KHUTSURI = 72, /* Geok */ |
4388f060 | 212 | /** @stable ICU 3.6 */ |
73c04bcf | 213 | USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */ |
4388f060 | 214 | /** @stable ICU 3.6 */ |
73c04bcf | 215 | USCRIPT_TRADITIONAL_HAN = 74, /* Hant */ |
4388f060 | 216 | /** @stable ICU 3.6 */ |
73c04bcf | 217 | USCRIPT_PAHAWH_HMONG = 75, /* Hmng */ |
4388f060 | 218 | /** @stable ICU 3.6 */ |
73c04bcf | 219 | USCRIPT_OLD_HUNGARIAN = 76, /* Hung */ |
4388f060 | 220 | /** @stable ICU 3.6 */ |
73c04bcf | 221 | USCRIPT_HARAPPAN_INDUS = 77, /* Inds */ |
4388f060 | 222 | /** @stable ICU 3.6 */ |
73c04bcf | 223 | USCRIPT_JAVANESE = 78, /* Java */ |
4388f060 | 224 | /** @stable ICU 3.6 */ |
73c04bcf | 225 | USCRIPT_KAYAH_LI = 79, /* Kali */ |
4388f060 | 226 | /** @stable ICU 3.6 */ |
73c04bcf | 227 | USCRIPT_LATIN_FRAKTUR = 80, /* Latf */ |
4388f060 | 228 | /** @stable ICU 3.6 */ |
73c04bcf | 229 | USCRIPT_LATIN_GAELIC = 81, /* Latg */ |
4388f060 | 230 | /** @stable ICU 3.6 */ |
73c04bcf | 231 | USCRIPT_LEPCHA = 82, /* Lepc */ |
4388f060 | 232 | /** @stable ICU 3.6 */ |
73c04bcf | 233 | USCRIPT_LINEAR_A = 83, /* Lina */ |
729e4ab9 A |
234 | /** @stable ICU 4.6 */ |
235 | USCRIPT_MANDAIC = 84, /* Mand */ | |
236 | /** @stable ICU 3.6 */ | |
237 | USCRIPT_MANDAEAN = USCRIPT_MANDAIC, | |
4388f060 | 238 | /** @stable ICU 3.6 */ |
73c04bcf | 239 | USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */ |
729e4ab9 A |
240 | /** @stable ICU 4.6 */ |
241 | USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */ | |
242 | /** @stable ICU 3.6 */ | |
243 | USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS, | |
4388f060 | 244 | /** @stable ICU 3.6 */ |
73c04bcf | 245 | USCRIPT_NKO = 87, /* Nkoo */ |
4388f060 | 246 | /** @stable ICU 3.6 */ |
73c04bcf | 247 | USCRIPT_ORKHON = 88, /* Orkh */ |
4388f060 | 248 | /** @stable ICU 3.6 */ |
73c04bcf | 249 | USCRIPT_OLD_PERMIC = 89, /* Perm */ |
4388f060 | 250 | /** @stable ICU 3.6 */ |
73c04bcf | 251 | USCRIPT_PHAGS_PA = 90, /* Phag */ |
4388f060 | 252 | /** @stable ICU 3.6 */ |
73c04bcf | 253 | USCRIPT_PHOENICIAN = 91, /* Phnx */ |
4388f060 | 254 | /** @stable ICU 3.6 */ |
73c04bcf | 255 | USCRIPT_PHONETIC_POLLARD = 92, /* Plrd */ |
4388f060 | 256 | /** @stable ICU 3.6 */ |
73c04bcf | 257 | USCRIPT_RONGORONGO = 93, /* Roro */ |
4388f060 | 258 | /** @stable ICU 3.6 */ |
73c04bcf | 259 | USCRIPT_SARATI = 94, /* Sara */ |
4388f060 | 260 | /** @stable ICU 3.6 */ |
73c04bcf | 261 | USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */ |
4388f060 | 262 | /** @stable ICU 3.6 */ |
73c04bcf | 263 | USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */ |
4388f060 | 264 | /** @stable ICU 3.6 */ |
73c04bcf | 265 | USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */ |
4388f060 | 266 | /** @stable ICU 3.6 */ |
73c04bcf | 267 | USCRIPT_TENGWAR = 98, /* Teng */ |
4388f060 | 268 | /** @stable ICU 3.6 */ |
73c04bcf | 269 | USCRIPT_VAI = 99, /* Vaii */ |
4388f060 | 270 | /** @stable ICU 3.6 */ |
729e4ab9 | 271 | USCRIPT_VISIBLE_SPEECH = 100,/* Visp */ |
4388f060 | 272 | /** @stable ICU 3.6 */ |
73c04bcf | 273 | USCRIPT_CUNEIFORM = 101,/* Xsux */ |
4388f060 | 274 | /** @stable ICU 3.6 */ |
73c04bcf | 275 | USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */ |
4388f060 | 276 | /** @stable ICU 3.6 */ |
73c04bcf | 277 | USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */ |
46f4442e | 278 | |
4388f060 A |
279 | /* New script codes from ISO 15924 */ |
280 | /** @stable ICU 3.8 */ | |
46f4442e | 281 | USCRIPT_CARIAN = 104,/* Cari */ |
4388f060 | 282 | /** @stable ICU 3.8 */ |
46f4442e | 283 | USCRIPT_JAPANESE = 105,/* Jpan */ |
4388f060 | 284 | /** @stable ICU 3.8 */ |
46f4442e | 285 | USCRIPT_LANNA = 106,/* Lana */ |
4388f060 | 286 | /** @stable ICU 3.8 */ |
46f4442e | 287 | USCRIPT_LYCIAN = 107,/* Lyci */ |
4388f060 | 288 | /** @stable ICU 3.8 */ |
46f4442e | 289 | USCRIPT_LYDIAN = 108,/* Lydi */ |
4388f060 | 290 | /** @stable ICU 3.8 */ |
46f4442e | 291 | USCRIPT_OL_CHIKI = 109,/* Olck */ |
4388f060 | 292 | /** @stable ICU 3.8 */ |
46f4442e | 293 | USCRIPT_REJANG = 110,/* Rjng */ |
4388f060 | 294 | /** @stable ICU 3.8 */ |
46f4442e | 295 | USCRIPT_SAURASHTRA = 111,/* Saur */ |
4388f060 | 296 | /** @stable ICU 3.8 */ |
46f4442e | 297 | USCRIPT_SIGN_WRITING = 112,/* Sgnw */ |
4388f060 | 298 | /** @stable ICU 3.8 */ |
46f4442e | 299 | USCRIPT_SUNDANESE = 113,/* Sund */ |
4388f060 | 300 | /** @stable ICU 3.8 */ |
46f4442e | 301 | USCRIPT_MOON = 114,/* Moon */ |
4388f060 | 302 | /** @stable ICU 3.8 */ |
46f4442e A |
303 | USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ |
304 | ||
4388f060 A |
305 | /* New script codes from ISO 15924 */ |
306 | /** @stable ICU 4.0 */ | |
46f4442e | 307 | USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ |
4388f060 | 308 | /** @stable ICU 4.0 */ |
46f4442e | 309 | USCRIPT_AVESTAN = 117,/* Avst */ |
4388f060 | 310 | /** @stable ICU 4.0 */ |
46f4442e | 311 | USCRIPT_CHAKMA = 118,/* Cakm */ |
4388f060 | 312 | /** @stable ICU 4.0 */ |
46f4442e | 313 | USCRIPT_KOREAN = 119,/* Kore */ |
4388f060 | 314 | /** @stable ICU 4.0 */ |
46f4442e | 315 | USCRIPT_KAITHI = 120,/* Kthi */ |
4388f060 | 316 | /** @stable ICU 4.0 */ |
46f4442e | 317 | USCRIPT_MANICHAEAN = 121,/* Mani */ |
4388f060 | 318 | /** @stable ICU 4.0 */ |
46f4442e | 319 | USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */ |
4388f060 | 320 | /** @stable ICU 4.0 */ |
46f4442e | 321 | USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */ |
4388f060 | 322 | /** @stable ICU 4.0 */ |
46f4442e | 323 | USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */ |
4388f060 | 324 | /** @stable ICU 4.0 */ |
46f4442e | 325 | USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */ |
4388f060 | 326 | /** @stable ICU 4.0 */ |
46f4442e | 327 | USCRIPT_SAMARITAN = 126,/* Samr */ |
4388f060 | 328 | /** @stable ICU 4.0 */ |
46f4442e | 329 | USCRIPT_TAI_VIET = 127,/* Tavt */ |
4388f060 | 330 | /** @stable ICU 4.0 */ |
46f4442e | 331 | USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */ |
4388f060 | 332 | /** @stable ICU 4.0 */ |
46f4442e A |
333 | USCRIPT_SYMBOLS = 129,/* Zsym */ |
334 | ||
4388f060 A |
335 | /* New script codes from ISO 15924 */ |
336 | /** @stable ICU 4.4 */ | |
729e4ab9 | 337 | USCRIPT_BAMUM = 130,/* Bamu */ |
4388f060 | 338 | /** @stable ICU 4.4 */ |
729e4ab9 | 339 | USCRIPT_LISU = 131,/* Lisu */ |
4388f060 | 340 | /** @stable ICU 4.4 */ |
729e4ab9 | 341 | USCRIPT_NAKHI_GEBA = 132,/* Nkgb */ |
4388f060 | 342 | /** @stable ICU 4.4 */ |
729e4ab9 A |
343 | USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */ |
344 | ||
4388f060 A |
345 | /* New script codes from ISO 15924 */ |
346 | /** @stable ICU 4.6 */ | |
729e4ab9 | 347 | USCRIPT_BASSA_VAH = 134,/* Bass */ |
4388f060 | 348 | /** @stable ICU 4.6 */ |
729e4ab9 | 349 | USCRIPT_DUPLOYAN_SHORTAND = 135,/* Dupl */ |
4388f060 | 350 | /** @stable ICU 4.6 */ |
729e4ab9 | 351 | USCRIPT_ELBASAN = 136,/* Elba */ |
4388f060 | 352 | /** @stable ICU 4.6 */ |
729e4ab9 | 353 | USCRIPT_GRANTHA = 137,/* Gran */ |
4388f060 | 354 | /** @stable ICU 4.6 */ |
729e4ab9 | 355 | USCRIPT_KPELLE = 138,/* Kpel */ |
4388f060 | 356 | /** @stable ICU 4.6 */ |
729e4ab9 | 357 | USCRIPT_LOMA = 139,/* Loma */ |
4388f060 | 358 | /** @stable ICU 4.6 */ |
729e4ab9 | 359 | USCRIPT_MENDE = 140,/* Mend */ |
4388f060 | 360 | /** @stable ICU 4.6 */ |
729e4ab9 | 361 | USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */ |
4388f060 | 362 | /** @stable ICU 4.6 */ |
729e4ab9 | 363 | USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */ |
4388f060 | 364 | /** @stable ICU 4.6 */ |
729e4ab9 | 365 | USCRIPT_NABATAEAN = 143,/* Nbat */ |
4388f060 | 366 | /** @stable ICU 4.6 */ |
729e4ab9 | 367 | USCRIPT_PALMYRENE = 144,/* Palm */ |
4388f060 | 368 | /** @stable ICU 4.6 */ |
729e4ab9 | 369 | USCRIPT_SINDHI = 145,/* Sind */ |
4388f060 | 370 | /** @stable ICU 4.6 */ |
729e4ab9 A |
371 | USCRIPT_WARANG_CITI = 146,/* Wara */ |
372 | ||
4388f060 A |
373 | /** @stable ICU 4.8 */ |
374 | USCRIPT_AFAKA = 147,/* Afak */ | |
375 | /** @stable ICU 4.8 */ | |
376 | USCRIPT_JURCHEN = 148,/* Jurc */ | |
377 | /** @stable ICU 4.8 */ | |
378 | USCRIPT_MRO = 149,/* Mroo */ | |
379 | /** @stable ICU 4.8 */ | |
380 | USCRIPT_NUSHU = 150,/* Nshu */ | |
381 | /** @stable ICU 4.8 */ | |
382 | USCRIPT_SHARADA = 151,/* Shrd */ | |
383 | /** @stable ICU 4.8 */ | |
384 | USCRIPT_SORA_SOMPENG = 152,/* Sora */ | |
385 | /** @stable ICU 4.8 */ | |
386 | USCRIPT_TAKRI = 153,/* Takr */ | |
387 | /** @stable ICU 4.8 */ | |
388 | USCRIPT_TANGUT = 154,/* Tang */ | |
389 | /** @stable ICU 4.8 */ | |
390 | USCRIPT_WOLEAI = 155,/* Wole */ | |
391 | ||
392 | /** @stable ICU 49 */ | |
393 | USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/* Hluw */ | |
394 | /** @stable ICU 49 */ | |
395 | USCRIPT_KHOJKI = 157,/* Khoj */ | |
396 | /** @stable ICU 49 */ | |
397 | USCRIPT_TIRHUTA = 158,/* Tirh */ | |
398 | ||
729e4ab9 | 399 | /* Private use codes from Qaaa - Qabx are not supported */ |
4388f060 A |
400 | |
401 | /** @stable ICU 2.2 */ | |
402 | USCRIPT_CODE_LIMIT = 159 | |
b75a7d8f A |
403 | } UScriptCode; |
404 | ||
405 | /** | |
406 | * Gets script codes associated with the given locale or ISO 15924 abbreviation or name. | |
407 | * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". | |
408 | * Fills in USCRIPT_LATIN given "en" OR "en_US" | |
409 | * If required capacity is greater than capacity of the destination buffer then the error code | |
410 | * is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned | |
411 | * | |
412 | * <p>Note: To search by short or long script alias only, use | |
413 | * u_getPropertyValueEnum(UCHAR_SCRIPT, alias) instead. This does | |
414 | * a fast lookup with no access of the locale data. | |
415 | * @param nameOrAbbrOrLocale name of the script, as given in | |
416 | * PropertyValueAliases.txt, or ISO 15924 code or locale | |
417 | * @param fillIn the UScriptCode buffer to fill in the script code | |
418 | * @param capacity the capacity (size) fo UScriptCode buffer passed in. | |
419 | * @param err the error status code. | |
420 | * @return The number of script codes filled in the buffer passed in | |
374ca955 | 421 | * @stable ICU 2.4 |
b75a7d8f | 422 | */ |
374ca955 | 423 | U_STABLE int32_t U_EXPORT2 |
b75a7d8f A |
424 | uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err); |
425 | ||
426 | /** | |
427 | * Gets a script name associated with the given script code. | |
428 | * Returns "Malayam" given USCRIPT_MALAYALAM | |
429 | * @param scriptCode UScriptCode enum | |
430 | * @return script long name as given in | |
431 | * PropertyValueAliases.txt, or NULL if scriptCode is invalid | |
374ca955 | 432 | * @stable ICU 2.4 |
b75a7d8f | 433 | */ |
374ca955 | 434 | U_STABLE const char* U_EXPORT2 |
b75a7d8f A |
435 | uscript_getName(UScriptCode scriptCode); |
436 | ||
437 | /** | |
438 | * Gets a script name associated with the given script code. | |
439 | * Returns "Mlym" given USCRIPT_MALAYALAM | |
440 | * @param scriptCode UScriptCode enum | |
441 | * @return script abbreviated name as given in | |
442 | * PropertyValueAliases.txt, or NULL if scriptCode is invalid | |
374ca955 | 443 | * @stable ICU 2.4 |
b75a7d8f | 444 | */ |
374ca955 | 445 | U_STABLE const char* U_EXPORT2 |
b75a7d8f A |
446 | uscript_getShortName(UScriptCode scriptCode); |
447 | ||
729e4ab9 | 448 | /** |
b75a7d8f A |
449 | * Gets the script code associated with the given codepoint. |
450 | * Returns USCRIPT_MALAYALAM given 0x0D02 | |
451 | * @param codepoint UChar32 codepoint | |
452 | * @param err the error status code. | |
453 | * @return The UScriptCode, or 0 if codepoint is invalid | |
374ca955 | 454 | * @stable ICU 2.4 |
b75a7d8f | 455 | */ |
374ca955 | 456 | U_STABLE UScriptCode U_EXPORT2 |
b75a7d8f A |
457 | uscript_getScript(UChar32 codepoint, UErrorCode *err); |
458 | ||
729e4ab9 | 459 | /** |
4388f060 A |
460 | * Do the Script_Extensions of code point c contain script sc? |
461 | * If c does not have explicit Script_Extensions, then this tests whether | |
462 | * c has the Script property value sc. | |
729e4ab9 A |
463 | * |
464 | * Some characters are commonly used in multiple scripts. | |
465 | * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. | |
466 | * | |
467 | * The Script_Extensions property is provisional. It may be modified or removed | |
468 | * in future versions of the Unicode Standard, and thus in ICU. | |
469 | * @param c code point | |
470 | * @param sc script code | |
4388f060 | 471 | * @return TRUE if sc is in Script_Extensions(c) |
51004dcb | 472 | * @stable ICU 49 |
729e4ab9 | 473 | */ |
51004dcb | 474 | U_STABLE UBool U_EXPORT2 |
729e4ab9 | 475 | uscript_hasScript(UChar32 c, UScriptCode sc); |
b75a7d8f | 476 | |
729e4ab9 A |
477 | /** |
478 | * Writes code point c's Script_Extensions as a list of UScriptCode values | |
4388f060 A |
479 | * to the output scripts array and returns the number of script codes. |
480 | * - If c does have Script_Extensions, then the Script property value | |
481 | * (normally Common or Inherited) is not included. | |
482 | * - If c does not have Script_Extensions, then the one Script code is written to the output array. | |
483 | * - If c is not a valid code point, then the one USCRIPT_UNKNOWN code is written. | |
484 | * In other words, if the return value is 1, | |
485 | * then the output array contains exactly c's single Script code. | |
486 | * If the return value is n>=2, then the output array contains c's n Script_Extensions script codes. | |
729e4ab9 A |
487 | * |
488 | * Some characters are commonly used in multiple scripts. | |
489 | * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. | |
490 | * | |
491 | * If there are more than capacity script codes to be written, then | |
492 | * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is returned. | |
493 | * (Usual ICU buffer handling behavior.) | |
494 | * | |
495 | * The Script_Extensions property is provisional. It may be modified or removed | |
496 | * in future versions of the Unicode Standard, and thus in ICU. | |
497 | * @param c code point | |
498 | * @param scripts output script code array | |
499 | * @param capacity capacity of the scripts array | |
500 | * @param errorCode Standard ICU error code. Its input value must | |
501 | * pass the U_SUCCESS() test, or else the function returns | |
502 | * immediately. Check for U_FAILURE() on output or use with | |
503 | * function chaining. (See User Guide for details.) | |
4388f060 | 504 | * @return number of script codes in c's Script_Extensions, or 1 for the single Script value, |
729e4ab9 | 505 | * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity |
51004dcb | 506 | * @stable ICU 49 |
729e4ab9 | 507 | */ |
51004dcb | 508 | U_STABLE int32_t U_EXPORT2 |
729e4ab9 A |
509 | uscript_getScriptExtensions(UChar32 c, |
510 | UScriptCode *scripts, int32_t capacity, | |
4388f060 | 511 | UErrorCode *errorCode); |
51004dcb A |
512 | |
513 | #ifndef U_HIDE_DRAFT_API | |
514 | ||
515 | /** | |
516 | * Script usage constants. | |
517 | * See UAX #31 Unicode Identifier and Pattern Syntax. | |
518 | * http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers | |
519 | * | |
520 | * @draft ICU 51 | |
521 | */ | |
522 | typedef enum UScriptUsage { | |
523 | /** Not encoded in Unicode. @draft ICU 51 */ | |
524 | USCRIPT_USAGE_NOT_ENCODED, | |
525 | /** Unknown script usage. @draft ICU 51 */ | |
526 | USCRIPT_USAGE_UNKNOWN, | |
527 | /** Candidate for Exclusion from Identifiers. @draft ICU 51 */ | |
528 | USCRIPT_USAGE_EXCLUDED, | |
529 | /** Limited Use script. @draft ICU 51 */ | |
530 | USCRIPT_USAGE_LIMITED_USE, | |
531 | /** Aspirational Use script. @draft ICU 51 */ | |
532 | USCRIPT_USAGE_ASPIRATIONAL, | |
533 | /** Recommended script. @draft ICU 51 */ | |
534 | USCRIPT_USAGE_RECOMMENDED | |
535 | } UScriptUsage; | |
536 | ||
537 | /** | |
538 | * Writes the script sample character string. | |
539 | * This string normally consists of one code point but might be longer. | |
540 | * The string is empty if the script is not encoded. | |
541 | * | |
542 | * @param script script code | |
543 | * @param dest output string array | |
544 | * @param capacity number of UChars in the dest array | |
545 | * @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input | |
546 | * @return the string length, even if U_BUFFER_OVERFLOW_ERROR | |
547 | * @draft ICU 51 | |
548 | */ | |
549 | U_DRAFT int32_t U_EXPORT2 | |
550 | uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode); | |
551 | ||
552 | #if U_SHOW_CPLUSPLUS_API | |
553 | ||
554 | U_NAMESPACE_BEGIN | |
555 | class UnicodeString; | |
556 | U_NAMESPACE_END | |
557 | ||
558 | /** | |
559 | * Returns the script sample character string. | |
560 | * This string normally consists of one code point but might be longer. | |
561 | * The string is empty if the script is not encoded. | |
562 | * | |
563 | * @param script script code | |
564 | * @return the sample character string | |
565 | * @draft ICU 51 | |
566 | */ | |
567 | U_COMMON_API icu::UnicodeString U_EXPORT2 | |
568 | uscript_getSampleUnicodeString(UScriptCode script); | |
569 | ||
570 | #endif | |
571 | ||
572 | /** | |
573 | * Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax. | |
574 | * Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicode. | |
575 | * | |
576 | * @param script script code | |
577 | * @return script usage | |
578 | * @see UScriptUsage | |
579 | * @draft ICU 51 | |
580 | */ | |
581 | U_DRAFT UScriptUsage U_EXPORT2 | |
582 | uscript_getUsage(UScriptCode script); | |
583 | ||
584 | /** | |
585 | * Returns TRUE if the script is written right-to-left. | |
586 | * For example, Arab and Hebr. | |
587 | * | |
588 | * @param script script code | |
589 | * @return TRUE if the script is right-to-left | |
590 | * @draft ICU 51 | |
591 | */ | |
592 | U_DRAFT UBool U_EXPORT2 | |
593 | uscript_isRightToLeft(UScriptCode script); | |
594 | ||
595 | /** | |
596 | * Returns TRUE if the script allows line breaks between letters (excluding hyphenation). | |
597 | * Such a script typically requires dictionary-based line breaking. | |
598 | * For example, Hani and Thai. | |
599 | * | |
600 | * @param script script code | |
601 | * @return TRUE if the script allows line breaks between letters | |
602 | * @draft ICU 51 | |
603 | */ | |
604 | U_DRAFT UBool U_EXPORT2 | |
605 | uscript_breaksBetweenLetters(UScriptCode script); | |
606 | ||
607 | /** | |
608 | * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary. | |
609 | * For example, Latn and Cyrl. | |
610 | * | |
611 | * @param script script code | |
612 | * @return TRUE if the script is cased | |
613 | * @draft ICU 51 | |
614 | */ | |
615 | U_DRAFT UBool U_EXPORT2 | |
616 | uscript_isCased(UScriptCode script); | |
617 | ||
4388f060 | 618 | #endif /* U_HIDE_DRAFT_API */ |
b75a7d8f | 619 | |
729e4ab9 | 620 | #endif |