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