1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu/source/common/unicode/uscript.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,627 @@ 1.4 +/* 1.5 + ********************************************************************** 1.6 + * Copyright (C) 1997-2013, International Business Machines 1.7 + * Corporation and others. All Rights Reserved. 1.8 + ********************************************************************** 1.9 + * 1.10 + * File USCRIPT.H 1.11 + * 1.12 + * Modification History: 1.13 + * 1.14 + * Date Name Description 1.15 + * 07/06/2001 Ram Creation. 1.16 + ****************************************************************************** 1.17 + */ 1.18 + 1.19 +#ifndef USCRIPT_H 1.20 +#define USCRIPT_H 1.21 +#include "unicode/utypes.h" 1.22 + 1.23 +/** 1.24 + * \file 1.25 + * \brief C API: Unicode Script Information 1.26 + */ 1.27 + 1.28 +/** 1.29 + * Constants for ISO 15924 script codes. 1.30 + * 1.31 + * Many of these script codes - those from Unicode's ScriptNames.txt - 1.32 + * are character property values for Unicode's Script property. 1.33 + * See UAX #24 Script Names (http://www.unicode.org/reports/tr24/). 1.34 + * 1.35 + * Starting with ICU 3.6, constants for most ISO 15924 script codes 1.36 + * are included (currently excluding private-use codes Qaaa..Qabx). 1.37 + * For scripts for which there are codes in ISO 15924 but which are not 1.38 + * used in the Unicode Character Database (UCD), there are no Unicode characters 1.39 + * associated with those scripts. 1.40 + * 1.41 + * For example, there are no characters that have a UCD script code of 1.42 + * Hans or Hant. All Han ideographs have the Hani script code. 1.43 + * The Hans and Hant script codes are used with CLDR data. 1.44 + * 1.45 + * ISO 15924 script codes are included for use with CLDR and similar. 1.46 + * 1.47 + * @stable ICU 2.2 1.48 + */ 1.49 +typedef enum UScriptCode { 1.50 + /* 1.51 + * Note: UScriptCode constants and their ISO script code comments 1.52 + * are parsed by preparseucd.py. 1.53 + * It matches lines like 1.54 + * USCRIPT_<Unicode Script value name> = <integer>, / * <ISO script code> * / 1.55 + */ 1.56 + 1.57 + /** @stable ICU 2.2 */ 1.58 + USCRIPT_INVALID_CODE = -1, 1.59 + /** @stable ICU 2.2 */ 1.60 + USCRIPT_COMMON = 0, /* Zyyy */ 1.61 + /** @stable ICU 2.2 */ 1.62 + USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */ 1.63 + /** @stable ICU 2.2 */ 1.64 + USCRIPT_ARABIC = 2, /* Arab */ 1.65 + /** @stable ICU 2.2 */ 1.66 + USCRIPT_ARMENIAN = 3, /* Armn */ 1.67 + /** @stable ICU 2.2 */ 1.68 + USCRIPT_BENGALI = 4, /* Beng */ 1.69 + /** @stable ICU 2.2 */ 1.70 + USCRIPT_BOPOMOFO = 5, /* Bopo */ 1.71 + /** @stable ICU 2.2 */ 1.72 + USCRIPT_CHEROKEE = 6, /* Cher */ 1.73 + /** @stable ICU 2.2 */ 1.74 + USCRIPT_COPTIC = 7, /* Copt */ 1.75 + /** @stable ICU 2.2 */ 1.76 + USCRIPT_CYRILLIC = 8, /* Cyrl */ 1.77 + /** @stable ICU 2.2 */ 1.78 + USCRIPT_DESERET = 9, /* Dsrt */ 1.79 + /** @stable ICU 2.2 */ 1.80 + USCRIPT_DEVANAGARI = 10, /* Deva */ 1.81 + /** @stable ICU 2.2 */ 1.82 + USCRIPT_ETHIOPIC = 11, /* Ethi */ 1.83 + /** @stable ICU 2.2 */ 1.84 + USCRIPT_GEORGIAN = 12, /* Geor */ 1.85 + /** @stable ICU 2.2 */ 1.86 + USCRIPT_GOTHIC = 13, /* Goth */ 1.87 + /** @stable ICU 2.2 */ 1.88 + USCRIPT_GREEK = 14, /* Grek */ 1.89 + /** @stable ICU 2.2 */ 1.90 + USCRIPT_GUJARATI = 15, /* Gujr */ 1.91 + /** @stable ICU 2.2 */ 1.92 + USCRIPT_GURMUKHI = 16, /* Guru */ 1.93 + /** @stable ICU 2.2 */ 1.94 + USCRIPT_HAN = 17, /* Hani */ 1.95 + /** @stable ICU 2.2 */ 1.96 + USCRIPT_HANGUL = 18, /* Hang */ 1.97 + /** @stable ICU 2.2 */ 1.98 + USCRIPT_HEBREW = 19, /* Hebr */ 1.99 + /** @stable ICU 2.2 */ 1.100 + USCRIPT_HIRAGANA = 20, /* Hira */ 1.101 + /** @stable ICU 2.2 */ 1.102 + USCRIPT_KANNADA = 21, /* Knda */ 1.103 + /** @stable ICU 2.2 */ 1.104 + USCRIPT_KATAKANA = 22, /* Kana */ 1.105 + /** @stable ICU 2.2 */ 1.106 + USCRIPT_KHMER = 23, /* Khmr */ 1.107 + /** @stable ICU 2.2 */ 1.108 + USCRIPT_LAO = 24, /* Laoo */ 1.109 + /** @stable ICU 2.2 */ 1.110 + USCRIPT_LATIN = 25, /* Latn */ 1.111 + /** @stable ICU 2.2 */ 1.112 + USCRIPT_MALAYALAM = 26, /* Mlym */ 1.113 + /** @stable ICU 2.2 */ 1.114 + USCRIPT_MONGOLIAN = 27, /* Mong */ 1.115 + /** @stable ICU 2.2 */ 1.116 + USCRIPT_MYANMAR = 28, /* Mymr */ 1.117 + /** @stable ICU 2.2 */ 1.118 + USCRIPT_OGHAM = 29, /* Ogam */ 1.119 + /** @stable ICU 2.2 */ 1.120 + USCRIPT_OLD_ITALIC = 30, /* Ital */ 1.121 + /** @stable ICU 2.2 */ 1.122 + USCRIPT_ORIYA = 31, /* Orya */ 1.123 + /** @stable ICU 2.2 */ 1.124 + USCRIPT_RUNIC = 32, /* Runr */ 1.125 + /** @stable ICU 2.2 */ 1.126 + USCRIPT_SINHALA = 33, /* Sinh */ 1.127 + /** @stable ICU 2.2 */ 1.128 + USCRIPT_SYRIAC = 34, /* Syrc */ 1.129 + /** @stable ICU 2.2 */ 1.130 + USCRIPT_TAMIL = 35, /* Taml */ 1.131 + /** @stable ICU 2.2 */ 1.132 + USCRIPT_TELUGU = 36, /* Telu */ 1.133 + /** @stable ICU 2.2 */ 1.134 + USCRIPT_THAANA = 37, /* Thaa */ 1.135 + /** @stable ICU 2.2 */ 1.136 + USCRIPT_THAI = 38, /* Thai */ 1.137 + /** @stable ICU 2.2 */ 1.138 + USCRIPT_TIBETAN = 39, /* Tibt */ 1.139 + /** Canadian_Aboriginal script. @stable ICU 2.6 */ 1.140 + USCRIPT_CANADIAN_ABORIGINAL = 40, /* Cans */ 1.141 + /** Canadian_Aboriginal script (alias). @stable ICU 2.2 */ 1.142 + USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL, 1.143 + /** @stable ICU 2.2 */ 1.144 + USCRIPT_YI = 41, /* Yiii */ 1.145 + /* New scripts in Unicode 3.2 */ 1.146 + /** @stable ICU 2.2 */ 1.147 + USCRIPT_TAGALOG = 42, /* Tglg */ 1.148 + /** @stable ICU 2.2 */ 1.149 + USCRIPT_HANUNOO = 43, /* Hano */ 1.150 + /** @stable ICU 2.2 */ 1.151 + USCRIPT_BUHID = 44, /* Buhd */ 1.152 + /** @stable ICU 2.2 */ 1.153 + USCRIPT_TAGBANWA = 45, /* Tagb */ 1.154 + 1.155 + /* New scripts in Unicode 4 */ 1.156 + /** @stable ICU 2.6 */ 1.157 + USCRIPT_BRAILLE = 46, /* Brai */ 1.158 + /** @stable ICU 2.6 */ 1.159 + USCRIPT_CYPRIOT = 47, /* Cprt */ 1.160 + /** @stable ICU 2.6 */ 1.161 + USCRIPT_LIMBU = 48, /* Limb */ 1.162 + /** @stable ICU 2.6 */ 1.163 + USCRIPT_LINEAR_B = 49, /* Linb */ 1.164 + /** @stable ICU 2.6 */ 1.165 + USCRIPT_OSMANYA = 50, /* Osma */ 1.166 + /** @stable ICU 2.6 */ 1.167 + USCRIPT_SHAVIAN = 51, /* Shaw */ 1.168 + /** @stable ICU 2.6 */ 1.169 + USCRIPT_TAI_LE = 52, /* Tale */ 1.170 + /** @stable ICU 2.6 */ 1.171 + USCRIPT_UGARITIC = 53, /* Ugar */ 1.172 + 1.173 + /** New script code in Unicode 4.0.1 @stable ICU 3.0 */ 1.174 + USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */ 1.175 + 1.176 + /* New scripts in Unicode 4.1 */ 1.177 + /** @stable ICU 3.4 */ 1.178 + USCRIPT_BUGINESE = 55, /* Bugi */ 1.179 + /** @stable ICU 3.4 */ 1.180 + USCRIPT_GLAGOLITIC = 56, /* Glag */ 1.181 + /** @stable ICU 3.4 */ 1.182 + USCRIPT_KHAROSHTHI = 57, /* Khar */ 1.183 + /** @stable ICU 3.4 */ 1.184 + USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */ 1.185 + /** @stable ICU 3.4 */ 1.186 + USCRIPT_NEW_TAI_LUE = 59, /* Talu */ 1.187 + /** @stable ICU 3.4 */ 1.188 + USCRIPT_TIFINAGH = 60, /* Tfng */ 1.189 + /** @stable ICU 3.4 */ 1.190 + USCRIPT_OLD_PERSIAN = 61, /* Xpeo */ 1.191 + 1.192 + /* New script codes from ISO 15924 */ 1.193 + /** @stable ICU 3.6 */ 1.194 + USCRIPT_BALINESE = 62, /* Bali */ 1.195 + /** @stable ICU 3.6 */ 1.196 + USCRIPT_BATAK = 63, /* Batk */ 1.197 + /** @stable ICU 3.6 */ 1.198 + USCRIPT_BLISSYMBOLS = 64, /* Blis */ 1.199 + /** @stable ICU 3.6 */ 1.200 + USCRIPT_BRAHMI = 65, /* Brah */ 1.201 + /** @stable ICU 3.6 */ 1.202 + USCRIPT_CHAM = 66, /* Cham */ 1.203 + /** @stable ICU 3.6 */ 1.204 + USCRIPT_CIRTH = 67, /* Cirt */ 1.205 + /** @stable ICU 3.6 */ 1.206 + USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC = 68, /* Cyrs */ 1.207 + /** @stable ICU 3.6 */ 1.208 + USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */ 1.209 + /** @stable ICU 3.6 */ 1.210 + USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */ 1.211 + /** @stable ICU 3.6 */ 1.212 + USCRIPT_EGYPTIAN_HIEROGLYPHS = 71, /* Egyp */ 1.213 + /** @stable ICU 3.6 */ 1.214 + USCRIPT_KHUTSURI = 72, /* Geok */ 1.215 + /** @stable ICU 3.6 */ 1.216 + USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */ 1.217 + /** @stable ICU 3.6 */ 1.218 + USCRIPT_TRADITIONAL_HAN = 74, /* Hant */ 1.219 + /** @stable ICU 3.6 */ 1.220 + USCRIPT_PAHAWH_HMONG = 75, /* Hmng */ 1.221 + /** @stable ICU 3.6 */ 1.222 + USCRIPT_OLD_HUNGARIAN = 76, /* Hung */ 1.223 + /** @stable ICU 3.6 */ 1.224 + USCRIPT_HARAPPAN_INDUS = 77, /* Inds */ 1.225 + /** @stable ICU 3.6 */ 1.226 + USCRIPT_JAVANESE = 78, /* Java */ 1.227 + /** @stable ICU 3.6 */ 1.228 + USCRIPT_KAYAH_LI = 79, /* Kali */ 1.229 + /** @stable ICU 3.6 */ 1.230 + USCRIPT_LATIN_FRAKTUR = 80, /* Latf */ 1.231 + /** @stable ICU 3.6 */ 1.232 + USCRIPT_LATIN_GAELIC = 81, /* Latg */ 1.233 + /** @stable ICU 3.6 */ 1.234 + USCRIPT_LEPCHA = 82, /* Lepc */ 1.235 + /** @stable ICU 3.6 */ 1.236 + USCRIPT_LINEAR_A = 83, /* Lina */ 1.237 + /** @stable ICU 4.6 */ 1.238 + USCRIPT_MANDAIC = 84, /* Mand */ 1.239 + /** @stable ICU 3.6 */ 1.240 + USCRIPT_MANDAEAN = USCRIPT_MANDAIC, 1.241 + /** @stable ICU 3.6 */ 1.242 + USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */ 1.243 + /** @stable ICU 4.6 */ 1.244 + USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */ 1.245 + /** @stable ICU 3.6 */ 1.246 + USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS, 1.247 + /** @stable ICU 3.6 */ 1.248 + USCRIPT_NKO = 87, /* Nkoo */ 1.249 + /** @stable ICU 3.6 */ 1.250 + USCRIPT_ORKHON = 88, /* Orkh */ 1.251 + /** @stable ICU 3.6 */ 1.252 + USCRIPT_OLD_PERMIC = 89, /* Perm */ 1.253 + /** @stable ICU 3.6 */ 1.254 + USCRIPT_PHAGS_PA = 90, /* Phag */ 1.255 + /** @stable ICU 3.6 */ 1.256 + USCRIPT_PHOENICIAN = 91, /* Phnx */ 1.257 + /** @stable ICU 52 */ 1.258 + USCRIPT_MIAO = 92, /* Plrd */ 1.259 + /** @stable ICU 3.6 */ 1.260 + USCRIPT_PHONETIC_POLLARD = USCRIPT_MIAO, 1.261 + /** @stable ICU 3.6 */ 1.262 + USCRIPT_RONGORONGO = 93, /* Roro */ 1.263 + /** @stable ICU 3.6 */ 1.264 + USCRIPT_SARATI = 94, /* Sara */ 1.265 + /** @stable ICU 3.6 */ 1.266 + USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */ 1.267 + /** @stable ICU 3.6 */ 1.268 + USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */ 1.269 + /** @stable ICU 3.6 */ 1.270 + USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */ 1.271 + /** @stable ICU 3.6 */ 1.272 + USCRIPT_TENGWAR = 98, /* Teng */ 1.273 + /** @stable ICU 3.6 */ 1.274 + USCRIPT_VAI = 99, /* Vaii */ 1.275 + /** @stable ICU 3.6 */ 1.276 + USCRIPT_VISIBLE_SPEECH = 100,/* Visp */ 1.277 + /** @stable ICU 3.6 */ 1.278 + USCRIPT_CUNEIFORM = 101,/* Xsux */ 1.279 + /** @stable ICU 3.6 */ 1.280 + USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */ 1.281 + /** @stable ICU 3.6 */ 1.282 + USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */ 1.283 + 1.284 + /* New script codes from ISO 15924 */ 1.285 + /** @stable ICU 3.8 */ 1.286 + USCRIPT_CARIAN = 104,/* Cari */ 1.287 + /** @stable ICU 3.8 */ 1.288 + USCRIPT_JAPANESE = 105,/* Jpan */ 1.289 + /** @stable ICU 3.8 */ 1.290 + USCRIPT_LANNA = 106,/* Lana */ 1.291 + /** @stable ICU 3.8 */ 1.292 + USCRIPT_LYCIAN = 107,/* Lyci */ 1.293 + /** @stable ICU 3.8 */ 1.294 + USCRIPT_LYDIAN = 108,/* Lydi */ 1.295 + /** @stable ICU 3.8 */ 1.296 + USCRIPT_OL_CHIKI = 109,/* Olck */ 1.297 + /** @stable ICU 3.8 */ 1.298 + USCRIPT_REJANG = 110,/* Rjng */ 1.299 + /** @stable ICU 3.8 */ 1.300 + USCRIPT_SAURASHTRA = 111,/* Saur */ 1.301 + /** @stable ICU 3.8 */ 1.302 + USCRIPT_SIGN_WRITING = 112,/* Sgnw */ 1.303 + /** @stable ICU 3.8 */ 1.304 + USCRIPT_SUNDANESE = 113,/* Sund */ 1.305 + /** @stable ICU 3.8 */ 1.306 + USCRIPT_MOON = 114,/* Moon */ 1.307 + /** @stable ICU 3.8 */ 1.308 + USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ 1.309 + 1.310 + /* New script codes from ISO 15924 */ 1.311 + /** @stable ICU 4.0 */ 1.312 + USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ 1.313 + /** @stable ICU 4.0 */ 1.314 + USCRIPT_AVESTAN = 117,/* Avst */ 1.315 + /** @stable ICU 4.0 */ 1.316 + USCRIPT_CHAKMA = 118,/* Cakm */ 1.317 + /** @stable ICU 4.0 */ 1.318 + USCRIPT_KOREAN = 119,/* Kore */ 1.319 + /** @stable ICU 4.0 */ 1.320 + USCRIPT_KAITHI = 120,/* Kthi */ 1.321 + /** @stable ICU 4.0 */ 1.322 + USCRIPT_MANICHAEAN = 121,/* Mani */ 1.323 + /** @stable ICU 4.0 */ 1.324 + USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */ 1.325 + /** @stable ICU 4.0 */ 1.326 + USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */ 1.327 + /** @stable ICU 4.0 */ 1.328 + USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */ 1.329 + /** @stable ICU 4.0 */ 1.330 + USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */ 1.331 + /** @stable ICU 4.0 */ 1.332 + USCRIPT_SAMARITAN = 126,/* Samr */ 1.333 + /** @stable ICU 4.0 */ 1.334 + USCRIPT_TAI_VIET = 127,/* Tavt */ 1.335 + /** @stable ICU 4.0 */ 1.336 + USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */ 1.337 + /** @stable ICU 4.0 */ 1.338 + USCRIPT_SYMBOLS = 129,/* Zsym */ 1.339 + 1.340 + /* New script codes from ISO 15924 */ 1.341 + /** @stable ICU 4.4 */ 1.342 + USCRIPT_BAMUM = 130,/* Bamu */ 1.343 + /** @stable ICU 4.4 */ 1.344 + USCRIPT_LISU = 131,/* Lisu */ 1.345 + /** @stable ICU 4.4 */ 1.346 + USCRIPT_NAKHI_GEBA = 132,/* Nkgb */ 1.347 + /** @stable ICU 4.4 */ 1.348 + USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */ 1.349 + 1.350 + /* New script codes from ISO 15924 */ 1.351 + /** @stable ICU 4.6 */ 1.352 + USCRIPT_BASSA_VAH = 134,/* Bass */ 1.353 + /** @stable ICU 4.6 */ 1.354 + USCRIPT_DUPLOYAN_SHORTAND = 135,/* Dupl */ 1.355 + /** @stable ICU 4.6 */ 1.356 + USCRIPT_ELBASAN = 136,/* Elba */ 1.357 + /** @stable ICU 4.6 */ 1.358 + USCRIPT_GRANTHA = 137,/* Gran */ 1.359 + /** @stable ICU 4.6 */ 1.360 + USCRIPT_KPELLE = 138,/* Kpel */ 1.361 + /** @stable ICU 4.6 */ 1.362 + USCRIPT_LOMA = 139,/* Loma */ 1.363 + /** @stable ICU 4.6 */ 1.364 + USCRIPT_MENDE = 140,/* Mend */ 1.365 + /** @stable ICU 4.6 */ 1.366 + USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */ 1.367 + /** @stable ICU 4.6 */ 1.368 + USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */ 1.369 + /** @stable ICU 4.6 */ 1.370 + USCRIPT_NABATAEAN = 143,/* Nbat */ 1.371 + /** @stable ICU 4.6 */ 1.372 + USCRIPT_PALMYRENE = 144,/* Palm */ 1.373 + /** @stable ICU 4.6 */ 1.374 + USCRIPT_SINDHI = 145,/* Sind */ 1.375 + /** @stable ICU 4.6 */ 1.376 + USCRIPT_WARANG_CITI = 146,/* Wara */ 1.377 + 1.378 + /** @stable ICU 4.8 */ 1.379 + USCRIPT_AFAKA = 147,/* Afak */ 1.380 + /** @stable ICU 4.8 */ 1.381 + USCRIPT_JURCHEN = 148,/* Jurc */ 1.382 + /** @stable ICU 4.8 */ 1.383 + USCRIPT_MRO = 149,/* Mroo */ 1.384 + /** @stable ICU 4.8 */ 1.385 + USCRIPT_NUSHU = 150,/* Nshu */ 1.386 + /** @stable ICU 4.8 */ 1.387 + USCRIPT_SHARADA = 151,/* Shrd */ 1.388 + /** @stable ICU 4.8 */ 1.389 + USCRIPT_SORA_SOMPENG = 152,/* Sora */ 1.390 + /** @stable ICU 4.8 */ 1.391 + USCRIPT_TAKRI = 153,/* Takr */ 1.392 + /** @stable ICU 4.8 */ 1.393 + USCRIPT_TANGUT = 154,/* Tang */ 1.394 + /** @stable ICU 4.8 */ 1.395 + USCRIPT_WOLEAI = 155,/* Wole */ 1.396 + 1.397 + /** @stable ICU 49 */ 1.398 + USCRIPT_ANATOLIAN_HIEROGLYPHS = 156,/* Hluw */ 1.399 + /** @stable ICU 49 */ 1.400 + USCRIPT_KHOJKI = 157,/* Khoj */ 1.401 + /** @stable ICU 49 */ 1.402 + USCRIPT_TIRHUTA = 158,/* Tirh */ 1.403 + 1.404 + /** @stable ICU 52 */ 1.405 + USCRIPT_CAUCASIAN_ALBANIAN = 159,/* Aghb */ 1.406 + /** @stable ICU 52 */ 1.407 + USCRIPT_MAHAJANI = 160,/* Mahj */ 1.408 + 1.409 + /* Private use codes from Qaaa - Qabx are not supported */ 1.410 + 1.411 + /** @stable ICU 2.2 */ 1.412 + USCRIPT_CODE_LIMIT = 161 1.413 +} UScriptCode; 1.414 + 1.415 +/** 1.416 + * Gets script codes associated with the given locale or ISO 15924 abbreviation or name. 1.417 + * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". 1.418 + * Fills in USCRIPT_LATIN given "en" OR "en_US" 1.419 + * If required capacity is greater than capacity of the destination buffer then the error code 1.420 + * is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned 1.421 + * 1.422 + * <p>Note: To search by short or long script alias only, use 1.423 + * u_getPropertyValueEnum(UCHAR_SCRIPT, alias) instead. This does 1.424 + * a fast lookup with no access of the locale data. 1.425 + * @param nameOrAbbrOrLocale name of the script, as given in 1.426 + * PropertyValueAliases.txt, or ISO 15924 code or locale 1.427 + * @param fillIn the UScriptCode buffer to fill in the script code 1.428 + * @param capacity the capacity (size) fo UScriptCode buffer passed in. 1.429 + * @param err the error status code. 1.430 + * @return The number of script codes filled in the buffer passed in 1.431 + * @stable ICU 2.4 1.432 + */ 1.433 +U_STABLE int32_t U_EXPORT2 1.434 +uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err); 1.435 + 1.436 +/** 1.437 + * Gets a script name associated with the given script code. 1.438 + * Returns "Malayam" given USCRIPT_MALAYALAM 1.439 + * @param scriptCode UScriptCode enum 1.440 + * @return script long name as given in 1.441 + * PropertyValueAliases.txt, or NULL if scriptCode is invalid 1.442 + * @stable ICU 2.4 1.443 + */ 1.444 +U_STABLE const char* U_EXPORT2 1.445 +uscript_getName(UScriptCode scriptCode); 1.446 + 1.447 +/** 1.448 + * Gets a script name associated with the given script code. 1.449 + * Returns "Mlym" given USCRIPT_MALAYALAM 1.450 + * @param scriptCode UScriptCode enum 1.451 + * @return script abbreviated name as given in 1.452 + * PropertyValueAliases.txt, or NULL if scriptCode is invalid 1.453 + * @stable ICU 2.4 1.454 + */ 1.455 +U_STABLE const char* U_EXPORT2 1.456 +uscript_getShortName(UScriptCode scriptCode); 1.457 + 1.458 +/** 1.459 + * Gets the script code associated with the given codepoint. 1.460 + * Returns USCRIPT_MALAYALAM given 0x0D02 1.461 + * @param codepoint UChar32 codepoint 1.462 + * @param err the error status code. 1.463 + * @return The UScriptCode, or 0 if codepoint is invalid 1.464 + * @stable ICU 2.4 1.465 + */ 1.466 +U_STABLE UScriptCode U_EXPORT2 1.467 +uscript_getScript(UChar32 codepoint, UErrorCode *err); 1.468 + 1.469 +/** 1.470 + * Do the Script_Extensions of code point c contain script sc? 1.471 + * If c does not have explicit Script_Extensions, then this tests whether 1.472 + * c has the Script property value sc. 1.473 + * 1.474 + * Some characters are commonly used in multiple scripts. 1.475 + * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. 1.476 + * 1.477 + * The Script_Extensions property is provisional. It may be modified or removed 1.478 + * in future versions of the Unicode Standard, and thus in ICU. 1.479 + * @param c code point 1.480 + * @param sc script code 1.481 + * @return TRUE if sc is in Script_Extensions(c) 1.482 + * @stable ICU 49 1.483 + */ 1.484 +U_STABLE UBool U_EXPORT2 1.485 +uscript_hasScript(UChar32 c, UScriptCode sc); 1.486 + 1.487 +/** 1.488 + * Writes code point c's Script_Extensions as a list of UScriptCode values 1.489 + * to the output scripts array and returns the number of script codes. 1.490 + * - If c does have Script_Extensions, then the Script property value 1.491 + * (normally Common or Inherited) is not included. 1.492 + * - If c does not have Script_Extensions, then the one Script code is written to the output array. 1.493 + * - If c is not a valid code point, then the one USCRIPT_UNKNOWN code is written. 1.494 + * In other words, if the return value is 1, 1.495 + * then the output array contains exactly c's single Script code. 1.496 + * If the return value is n>=2, then the output array contains c's n Script_Extensions script codes. 1.497 + * 1.498 + * Some characters are commonly used in multiple scripts. 1.499 + * For more information, see UAX #24: http://www.unicode.org/reports/tr24/. 1.500 + * 1.501 + * If there are more than capacity script codes to be written, then 1.502 + * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is returned. 1.503 + * (Usual ICU buffer handling behavior.) 1.504 + * 1.505 + * The Script_Extensions property is provisional. It may be modified or removed 1.506 + * in future versions of the Unicode Standard, and thus in ICU. 1.507 + * @param c code point 1.508 + * @param scripts output script code array 1.509 + * @param capacity capacity of the scripts array 1.510 + * @param errorCode Standard ICU error code. Its input value must 1.511 + * pass the U_SUCCESS() test, or else the function returns 1.512 + * immediately. Check for U_FAILURE() on output or use with 1.513 + * function chaining. (See User Guide for details.) 1.514 + * @return number of script codes in c's Script_Extensions, or 1 for the single Script value, 1.515 + * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity 1.516 + * @stable ICU 49 1.517 + */ 1.518 +U_STABLE int32_t U_EXPORT2 1.519 +uscript_getScriptExtensions(UChar32 c, 1.520 + UScriptCode *scripts, int32_t capacity, 1.521 + UErrorCode *errorCode); 1.522 + 1.523 +#ifndef U_HIDE_DRAFT_API 1.524 + 1.525 +/** 1.526 + * Script usage constants. 1.527 + * See UAX #31 Unicode Identifier and Pattern Syntax. 1.528 + * http://www.unicode.org/reports/tr31/#Table_Candidate_Characters_for_Exclusion_from_Identifiers 1.529 + * 1.530 + * @draft ICU 51 1.531 + */ 1.532 +typedef enum UScriptUsage { 1.533 + /** Not encoded in Unicode. @draft ICU 51 */ 1.534 + USCRIPT_USAGE_NOT_ENCODED, 1.535 + /** Unknown script usage. @draft ICU 51 */ 1.536 + USCRIPT_USAGE_UNKNOWN, 1.537 + /** Candidate for Exclusion from Identifiers. @draft ICU 51 */ 1.538 + USCRIPT_USAGE_EXCLUDED, 1.539 + /** Limited Use script. @draft ICU 51 */ 1.540 + USCRIPT_USAGE_LIMITED_USE, 1.541 + /** Aspirational Use script. @draft ICU 51 */ 1.542 + USCRIPT_USAGE_ASPIRATIONAL, 1.543 + /** Recommended script. @draft ICU 51 */ 1.544 + USCRIPT_USAGE_RECOMMENDED 1.545 +} UScriptUsage; 1.546 + 1.547 +/** 1.548 + * Writes the script sample character string. 1.549 + * This string normally consists of one code point but might be longer. 1.550 + * The string is empty if the script is not encoded. 1.551 + * 1.552 + * @param script script code 1.553 + * @param dest output string array 1.554 + * @param capacity number of UChars in the dest array 1.555 + * @param pErrorCode standard ICU in/out error code, must pass U_SUCCESS() on input 1.556 + * @return the string length, even if U_BUFFER_OVERFLOW_ERROR 1.557 + * @draft ICU 51 1.558 + */ 1.559 +U_DRAFT int32_t U_EXPORT2 1.560 +uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode); 1.561 + 1.562 +#if U_SHOW_CPLUSPLUS_API 1.563 + 1.564 +U_NAMESPACE_BEGIN 1.565 +class UnicodeString; 1.566 +U_NAMESPACE_END 1.567 + 1.568 +/** 1.569 + * Returns the script sample character string. 1.570 + * This string normally consists of one code point but might be longer. 1.571 + * The string is empty if the script is not encoded. 1.572 + * 1.573 + * @param script script code 1.574 + * @return the sample character string 1.575 + * @draft ICU 51 1.576 + */ 1.577 +U_COMMON_API icu::UnicodeString U_EXPORT2 1.578 +uscript_getSampleUnicodeString(UScriptCode script); 1.579 + 1.580 +#endif 1.581 + 1.582 +/** 1.583 + * Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax. 1.584 + * Returns USCRIPT_USAGE_NOT_ENCODED if the script is not encoded in Unicode. 1.585 + * 1.586 + * @param script script code 1.587 + * @return script usage 1.588 + * @see UScriptUsage 1.589 + * @draft ICU 51 1.590 + */ 1.591 +U_DRAFT UScriptUsage U_EXPORT2 1.592 +uscript_getUsage(UScriptCode script); 1.593 + 1.594 +/** 1.595 + * Returns TRUE if the script is written right-to-left. 1.596 + * For example, Arab and Hebr. 1.597 + * 1.598 + * @param script script code 1.599 + * @return TRUE if the script is right-to-left 1.600 + * @draft ICU 51 1.601 + */ 1.602 +U_DRAFT UBool U_EXPORT2 1.603 +uscript_isRightToLeft(UScriptCode script); 1.604 + 1.605 +/** 1.606 + * Returns TRUE if the script allows line breaks between letters (excluding hyphenation). 1.607 + * Such a script typically requires dictionary-based line breaking. 1.608 + * For example, Hani and Thai. 1.609 + * 1.610 + * @param script script code 1.611 + * @return TRUE if the script allows line breaks between letters 1.612 + * @draft ICU 51 1.613 + */ 1.614 +U_DRAFT UBool U_EXPORT2 1.615 +uscript_breaksBetweenLetters(UScriptCode script); 1.616 + 1.617 +/** 1.618 + * Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary. 1.619 + * For example, Latn and Cyrl. 1.620 + * 1.621 + * @param script script code 1.622 + * @return TRUE if the script is cased 1.623 + * @draft ICU 51 1.624 + */ 1.625 +U_DRAFT UBool U_EXPORT2 1.626 +uscript_isCased(UScriptCode script); 1.627 + 1.628 +#endif /* U_HIDE_DRAFT_API */ 1.629 + 1.630 +#endif