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