2
**********************************************************************
3
* Copyright (C) 1997-2001, International Business Machines
4
* Corporation and others. All Rights Reserved.
5
**********************************************************************
9
* Modification History:
11
* Date Name Description
12
* 07/06/2001 Ram Creation.
13
******************************************************************************
20
* Constants for Unicode script values from ScriptNames.txt .
24
typedef enum UScriptCode {
25
USCRIPT_INVALID_CODE = -1,
26
USCRIPT_COMMON = 0 , /* Zyyy */
27
USCRIPT_INHERITED = 1, /* Qaai */
28
USCRIPT_ARABIC = 2, /* Arab */
29
USCRIPT_ARMENIAN = 3, /* Armn */
30
USCRIPT_BENGALI = 4, /* Beng */
31
USCRIPT_BOPOMOFO = 5, /* Bopo */
32
USCRIPT_CHEROKEE = 6, /* Cher */
33
USCRIPT_COPTIC = 7, /* Qaac */
34
USCRIPT_CYRILLIC = 8, /* Cyrl (Cyrs) */
35
USCRIPT_DESERET = 9, /* Dsrt */
36
USCRIPT_DEVANAGARI = 10, /* Deva */
37
USCRIPT_ETHIOPIC = 11, /* Ethi */
38
USCRIPT_GEORGIAN = 12, /* Geor (Geon, Geoa) */
39
USCRIPT_GOTHIC = 13, /* Goth */
40
USCRIPT_GREEK = 14, /* Grek */
41
USCRIPT_GUJARATI = 15, /* Gujr */
42
USCRIPT_GURMUKHI = 16, /* Guru */
43
USCRIPT_HAN = 17, /* Hani */
44
USCRIPT_HANGUL = 18, /* Hang */
45
USCRIPT_HEBREW = 19, /* Hebr */
46
USCRIPT_HIRAGANA = 20, /* Hira */
47
USCRIPT_KANNADA = 21, /* Knda */
48
USCRIPT_KATAKANA = 22, /* Kana */
49
USCRIPT_KHMER = 23, /* Khmr */
50
USCRIPT_LAO = 24, /* Laoo */
51
USCRIPT_LATIN = 25, /* Latn (Latf, Latg) */
52
USCRIPT_MALAYALAM = 26, /* Mlym */
53
USCRIPT_MONGOLIAN = 27, /* Mong */
54
USCRIPT_MYANMAR = 28, /* Mymr */
55
USCRIPT_OGHAM = 29, /* Ogam */
56
USCRIPT_OLD_ITALIC = 30, /* Ital */
57
USCRIPT_ORIYA = 31, /* Orya */
58
USCRIPT_RUNIC = 32, /* Runr */
59
USCRIPT_SINHALA = 33, /* Sinh */
60
USCRIPT_SYRIAC = 34, /* Syrc (Syrj, Syrn, Syre) */
61
USCRIPT_TAMIL = 35, /* Taml */
62
USCRIPT_TELUGU = 36, /* Telu */
63
USCRIPT_THAANA = 37, /* Thaa */
64
USCRIPT_THAI = 38, /* Thai */
65
USCRIPT_TIBETAN = 39, /* Tibt */
66
USCRIPT_UCAS = 40, /* Cans */
67
USCRIPT_YI = 41, /* Yiii */
68
USCRIPT_CODE_LIMIT = 42
72
* Gets script codes associated with the given locale or ISO 15924 abbreviation or name.
73
* Fills in USCRIPT_MALAYAM given "Malayam" OR "Mlym".
74
* Fills in USCRIPT_LATIN given "en" OR "en_US"
75
* If required capacity is greater than capacity of the destination buffer then the error code
76
* is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned
77
* @param nameOrAbbrOrLocale name of the script or ISO 15924 code or locale
78
* @param fillIn the UScriptCode buffer to fill in the script code
79
* @param capacity the capacity (size) fo UScriptCode buffer passed in.
80
* @param err the error status code.
81
* @return The number of script codes filled in the buffer passed in
84
U_CAPI int32_t U_EXPORT2
85
uscript_getCode(const char* nameOrAbbrOrLocale,UScriptCode* fillIn,int32_t capacity,UErrorCode *err);
88
* Gets a script name associated with the given script code.
89
* Returns "Malayam" given USCRIPT_MALAYAM
90
* @param scriptCode UScriptCode enum
91
* @return script name as a string in full as given in TR#24
94
U_CAPI const char* U_EXPORT2
95
uscript_getName(UScriptCode scriptCode);
98
* Gets a script name associated with the given script code.
99
* Returns "Mlym" given USCRIPT_MALAYAM
100
* @param scriptCode UScriptCode enum
101
* @return script abbreviated name as a string as given in TR#24
104
U_CAPI const char* U_EXPORT2
105
uscript_getShortName(UScriptCode scriptCode);
108
* Gets the script code associated with the given codepoint.
109
* Returns USCRIPT_MALAYAM given 0x0D02
110
* @param codepoint UChar32 codepoint
111
* @param err the error status code.
112
* @return The UScriptCode
115
U_CAPI UScriptCode U_EXPORT2
116
uscript_getScript(UChar32 codepoint, UErrorCode *err);