ICU 64.2  64.2
uscript.h
Go to the documentation of this file.
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 
54 typedef enum UScriptCode {
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 
65  USCRIPT_COMMON = 0, /* Zyyy */
67  USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */
69  USCRIPT_ARABIC = 2, /* Arab */
71  USCRIPT_ARMENIAN = 3, /* Armn */
73  USCRIPT_BENGALI = 4, /* Beng */
75  USCRIPT_BOPOMOFO = 5, /* Bopo */
77  USCRIPT_CHEROKEE = 6, /* Cher */
79  USCRIPT_COPTIC = 7, /* Copt */
81  USCRIPT_CYRILLIC = 8, /* Cyrl */
83  USCRIPT_DESERET = 9, /* Dsrt */
85  USCRIPT_DEVANAGARI = 10, /* Deva */
87  USCRIPT_ETHIOPIC = 11, /* Ethi */
89  USCRIPT_GEORGIAN = 12, /* Geor */
91  USCRIPT_GOTHIC = 13, /* Goth */
93  USCRIPT_GREEK = 14, /* Grek */
95  USCRIPT_GUJARATI = 15, /* Gujr */
97  USCRIPT_GURMUKHI = 16, /* Guru */
99  USCRIPT_HAN = 17, /* Hani */
101  USCRIPT_HANGUL = 18, /* Hang */
103  USCRIPT_HEBREW = 19, /* Hebr */
105  USCRIPT_HIRAGANA = 20, /* Hira */
107  USCRIPT_KANNADA = 21, /* Knda */
109  USCRIPT_KATAKANA = 22, /* Kana */
111  USCRIPT_KHMER = 23, /* Khmr */
113  USCRIPT_LAO = 24, /* Laoo */
115  USCRIPT_LATIN = 25, /* Latn */
117  USCRIPT_MALAYALAM = 26, /* Mlym */
119  USCRIPT_MONGOLIAN = 27, /* Mong */
121  USCRIPT_MYANMAR = 28, /* Mymr */
123  USCRIPT_OGHAM = 29, /* Ogam */
125  USCRIPT_OLD_ITALIC = 30, /* Ital */
127  USCRIPT_ORIYA = 31, /* Orya */
129  USCRIPT_RUNIC = 32, /* Runr */
131  USCRIPT_SINHALA = 33, /* Sinh */
133  USCRIPT_SYRIAC = 34, /* Syrc */
135  USCRIPT_TAMIL = 35, /* Taml */
137  USCRIPT_TELUGU = 36, /* Telu */
139  USCRIPT_THAANA = 37, /* Thaa */
141  USCRIPT_THAI = 38, /* Thai */
143  USCRIPT_TIBETAN = 39, /* Tibt */
149  USCRIPT_YI = 41, /* Yiii */
150  /* New scripts in Unicode 3.2 */
152  USCRIPT_TAGALOG = 42, /* Tglg */
154  USCRIPT_HANUNOO = 43, /* Hano */
156  USCRIPT_BUHID = 44, /* Buhd */
158  USCRIPT_TAGBANWA = 45, /* Tagb */
159 
160  /* New scripts in Unicode 4 */
162  USCRIPT_BRAILLE = 46, /* Brai */
164  USCRIPT_CYPRIOT = 47, /* Cprt */
166  USCRIPT_LIMBU = 48, /* Limb */
168  USCRIPT_LINEAR_B = 49, /* Linb */
170  USCRIPT_OSMANYA = 50, /* Osma */
172  USCRIPT_SHAVIAN = 51, /* Shaw */
174  USCRIPT_TAI_LE = 52, /* Tale */
176  USCRIPT_UGARITIC = 53, /* Ugar */
177 
180 
181  /* New scripts in Unicode 4.1 */
183  USCRIPT_BUGINESE = 55, /* Bugi */
185  USCRIPT_GLAGOLITIC = 56, /* Glag */
187  USCRIPT_KHAROSHTHI = 57, /* Khar */
189  USCRIPT_SYLOTI_NAGRI = 58, /* Sylo */
191  USCRIPT_NEW_TAI_LUE = 59, /* Talu */
193  USCRIPT_TIFINAGH = 60, /* Tfng */
195  USCRIPT_OLD_PERSIAN = 61, /* Xpeo */
196 
197  /* New script codes from Unicode and ISO 15924 */
199  USCRIPT_BALINESE = 62, /* Bali */
201  USCRIPT_BATAK = 63, /* Batk */
203  USCRIPT_BLISSYMBOLS = 64, /* Blis */
205  USCRIPT_BRAHMI = 65, /* Brah */
207  USCRIPT_CHAM = 66, /* Cham */
209  USCRIPT_CIRTH = 67, /* Cirt */
213  USCRIPT_DEMOTIC_EGYPTIAN = 69, /* Egyd */
215  USCRIPT_HIERATIC_EGYPTIAN = 70, /* Egyh */
219  USCRIPT_KHUTSURI = 72, /* Geok */
221  USCRIPT_SIMPLIFIED_HAN = 73, /* Hans */
223  USCRIPT_TRADITIONAL_HAN = 74, /* Hant */
225  USCRIPT_PAHAWH_HMONG = 75, /* Hmng */
227  USCRIPT_OLD_HUNGARIAN = 76, /* Hung */
229  USCRIPT_HARAPPAN_INDUS = 77, /* Inds */
231  USCRIPT_JAVANESE = 78, /* Java */
233  USCRIPT_KAYAH_LI = 79, /* Kali */
235  USCRIPT_LATIN_FRAKTUR = 80, /* Latf */
237  USCRIPT_LATIN_GAELIC = 81, /* Latg */
239  USCRIPT_LEPCHA = 82, /* Lepc */
241  USCRIPT_LINEAR_A = 83, /* Lina */
243  USCRIPT_MANDAIC = 84, /* Mand */
247  USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */
253  USCRIPT_NKO = 87, /* Nkoo */
255  USCRIPT_ORKHON = 88, /* Orkh */
257  USCRIPT_OLD_PERMIC = 89, /* Perm */
259  USCRIPT_PHAGS_PA = 90, /* Phag */
261  USCRIPT_PHOENICIAN = 91, /* Phnx */
263  USCRIPT_MIAO = 92, /* Plrd */
267  USCRIPT_RONGORONGO = 93, /* Roro */
269  USCRIPT_SARATI = 94, /* Sara */
271  USCRIPT_ESTRANGELO_SYRIAC = 95, /* Syre */
273  USCRIPT_WESTERN_SYRIAC = 96, /* Syrj */
275  USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */
277  USCRIPT_TENGWAR = 98, /* Teng */
279  USCRIPT_VAI = 99, /* Vaii */
281  USCRIPT_VISIBLE_SPEECH = 100,/* Visp */
283  USCRIPT_CUNEIFORM = 101,/* Xsux */
287  USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */
288 
290  USCRIPT_CARIAN = 104,/* Cari */
292  USCRIPT_JAPANESE = 105,/* Jpan */
294  USCRIPT_LANNA = 106,/* Lana */
296  USCRIPT_LYCIAN = 107,/* Lyci */
298  USCRIPT_LYDIAN = 108,/* Lydi */
300  USCRIPT_OL_CHIKI = 109,/* Olck */
302  USCRIPT_REJANG = 110,/* Rjng */
304  USCRIPT_SAURASHTRA = 111,/* Saur */
306  USCRIPT_SIGN_WRITING = 112,/* Sgnw */
308  USCRIPT_SUNDANESE = 113,/* Sund */
310  USCRIPT_MOON = 114,/* Moon */
312  USCRIPT_MEITEI_MAYEK = 115,/* Mtei */
313 
315  USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */
317  USCRIPT_AVESTAN = 117,/* Avst */
319  USCRIPT_CHAKMA = 118,/* Cakm */
321  USCRIPT_KOREAN = 119,/* Kore */
323  USCRIPT_KAITHI = 120,/* Kthi */
325  USCRIPT_MANICHAEAN = 121,/* Mani */
329  USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */
331  USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */
335  USCRIPT_SAMARITAN = 126,/* Samr */
337  USCRIPT_TAI_VIET = 127,/* Tavt */
341  USCRIPT_SYMBOLS = 129,/* Zsym */
342 
344  USCRIPT_BAMUM = 130,/* Bamu */
346  USCRIPT_LISU = 131,/* Lisu */
348  USCRIPT_NAKHI_GEBA = 132,/* Nkgb */
350  USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */
351 
353  USCRIPT_BASSA_VAH = 134,/* Bass */
355  USCRIPT_DUPLOYAN = 135,/* Dupl */
356 #ifndef U_HIDE_DEPRECATED_API
357 
359 #endif /* U_HIDE_DEPRECATED_API */
360 
361  USCRIPT_ELBASAN = 136,/* Elba */
363  USCRIPT_GRANTHA = 137,/* Gran */
365  USCRIPT_KPELLE = 138,/* Kpel */
367  USCRIPT_LOMA = 139,/* Loma */
369  USCRIPT_MENDE = 140,/* Mend */
371  USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */
373  USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */
375  USCRIPT_NABATAEAN = 143,/* Nbat */
377  USCRIPT_PALMYRENE = 144,/* Palm */
379  USCRIPT_KHUDAWADI = 145,/* Sind */
383  USCRIPT_WARANG_CITI = 146,/* Wara */
384 
386  USCRIPT_AFAKA = 147,/* Afak */
388  USCRIPT_JURCHEN = 148,/* Jurc */
390  USCRIPT_MRO = 149,/* Mroo */
392  USCRIPT_NUSHU = 150,/* Nshu */
394  USCRIPT_SHARADA = 151,/* Shrd */
396  USCRIPT_SORA_SOMPENG = 152,/* Sora */
398  USCRIPT_TAKRI = 153,/* Takr */
400  USCRIPT_TANGUT = 154,/* Tang */
402  USCRIPT_WOLEAI = 155,/* Wole */
403 
407  USCRIPT_KHOJKI = 157,/* Khoj */
409  USCRIPT_TIRHUTA = 158,/* Tirh */
410 
412  USCRIPT_CAUCASIAN_ALBANIAN = 159,/* Aghb */
414  USCRIPT_MAHAJANI = 160,/* Mahj */
415 
417  USCRIPT_AHOM = 161,/* Ahom */
419  USCRIPT_HATRAN = 162,/* Hatr */
421  USCRIPT_MODI = 163,/* Modi */
423  USCRIPT_MULTANI = 164,/* Mult */
425  USCRIPT_PAU_CIN_HAU = 165,/* Pauc */
427  USCRIPT_SIDDHAM = 166,/* Sidd */
428 
430  USCRIPT_ADLAM = 167,/* Adlm */
432  USCRIPT_BHAIKSUKI = 168,/* Bhks */
434  USCRIPT_MARCHEN = 169,/* Marc */
436  USCRIPT_NEWA = 170,/* Newa */
438  USCRIPT_OSAGE = 171,/* Osge */
439 
441  USCRIPT_HAN_WITH_BOPOMOFO = 172,/* Hanb */
443  USCRIPT_JAMO = 173,/* Jamo */
445  USCRIPT_SYMBOLS_EMOJI = 174,/* Zsye */
446 
448  USCRIPT_MASARAM_GONDI = 175,/* Gonm */
450  USCRIPT_SOYOMBO = 176,/* Soyo */
452  USCRIPT_ZANABAZAR_SQUARE = 177,/* Zanb */
453 
455  USCRIPT_DOGRA = 178,/* Dogr */
457  USCRIPT_GUNJALA_GONDI = 179,/* Gong */
459  USCRIPT_MAKASAR = 180,/* Maka */
461  USCRIPT_MEDEFAIDRIN = 181,/* Medf */
463  USCRIPT_HANIFI_ROHINGYA = 182,/* Rohg */
465  USCRIPT_SOGDIAN = 183,/* Sogd */
467  USCRIPT_OLD_SOGDIAN = 184,/* Sogo */
468 
470  USCRIPT_ELYMAIC = 185,/* Elym */
474  USCRIPT_NANDINAGARI = 187,/* Nand */
476  USCRIPT_WANCHO = 188,/* Wcho */
477 
478 #ifndef U_HIDE_DEPRECATED_API
479 
486 #endif // U_HIDE_DEPRECATED_API
487 } UScriptCode;
488 
508 U_STABLE int32_t U_EXPORT2
509 uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err);
510 
521 U_STABLE const char* U_EXPORT2
522 uscript_getName(UScriptCode scriptCode);
523 
533 U_STABLE const char* U_EXPORT2
535 
544 U_STABLE UScriptCode U_EXPORT2
545 uscript_getScript(UChar32 codepoint, UErrorCode *err);
546 
559 U_STABLE UBool U_EXPORT2
561 
591 U_STABLE int32_t U_EXPORT2
593  UScriptCode *scripts, int32_t capacity,
594  UErrorCode *errorCode);
595 
603 typedef enum UScriptUsage {
616 } UScriptUsage;
617 
630 U_STABLE int32_t U_EXPORT2
631 uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode);
632 
633 #if U_SHOW_CPLUSPLUS_API
634 
636 class UnicodeString;
638 
650 
651 #endif
652 
662 U_STABLE UScriptUsage U_EXPORT2
664 
673 U_STABLE UBool U_EXPORT2
675 
685 U_STABLE UBool U_EXPORT2
687 
696 U_STABLE UBool U_EXPORT2
698 
699 #endif
Sutton SignWriting.
Definition: uscript.h:306
UScriptCode uscript_getScript(UChar32 codepoint, UErrorCode *err)
Gets the script code associated with the given codepoint.
Canadian_Aboriginal script.
Definition: uscript.h:145
Aspirational Use script.
Definition: uscript.h:613
New script code in Unicode 4.0.1.
Definition: uscript.h:179
Candidate for Exclusion from Identifiers.
Definition: uscript.h:609
Mende Kikakui.
Definition: uscript.h:369
const char * uscript_getName(UScriptCode scriptCode)
Returns the long Unicode script name, if there is one.
int32_t uscript_getSampleString(UScriptCode script, UChar *dest, int32_t capacity, UErrorCode *pErrorCode)
Writes the script sample character string.
One more than the highest normal UScriptCode value.
Definition: uscript.h:485
UBool uscript_isCased(UScriptCode script)
Returns TRUE if in modern (or most recent) usage of the script case distinctions are customary...
UScriptCode
Constants for ISO 15924 script codes.
Definition: uscript.h:54
UBool uscript_isRightToLeft(UScriptCode script)
Returns TRUE if the script is written right-to-left.
UScriptUsage uscript_getUsage(UScriptCode script)
Returns the script usage according to UAX #31 Unicode Identifier and Pattern Syntax.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
int32_t uscript_getScriptExtensions(UChar32 c, UScriptCode *scripts, int32_t capacity, UErrorCode *errorCode)
Writes code point c&#39;s Script_Extensions as a list of UScriptCode values to the output scripts array a...
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
Definition: umachine.h:389
Unknown script usage.
Definition: uscript.h:607
uint16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:342
UBool uscript_breaksBetweenLetters(UScriptCode script)
Returns TRUE if the script allows line breaks between letters (excluding hyphenation).
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
Canadian_Aboriginal script (alias).
Definition: uscript.h:147
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
UScriptUsage
Script usage constants.
Definition: uscript.h:603
Not encoded in Unicode.
Definition: uscript.h:605
Recommended script.
Definition: uscript.h:615
Basic definitions for ICU, for both C and C++ APIs.
Limited Use script.
Definition: uscript.h:611
const char * uscript_getShortName(UScriptCode scriptCode)
Returns the 4-letter ISO 15924 script code, which is the same as the short Unicode script name if Uni...
int32_t uscript_getCode(const char *nameOrAbbrOrLocale, UScriptCode *fillIn, int32_t capacity, UErrorCode *err)
Gets the script codes associated with the given locale or ISO 15924 abbreviation or name...
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
Definition: utypes.h:300
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
Definition: unistr.h:289
UBool uscript_hasScript(UChar32 c, UScriptCode sc)
Do the Script_Extensions of code point c contain script sc? If c does not have explicit Script_Extens...
U_COMMON_API icu::UnicodeString uscript_getSampleUnicodeString(UScriptCode script)
Returns the script sample character string.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:111
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225