/*
-**********************************************************************
-* Copyright (C) 1997-2006, International Business Machines
-* Corporation and others. All Rights Reserved.
-**********************************************************************
-*
-* File USCRIPT.H
-*
-* Modification History:
-*
-* Date Name Description
-* 07/06/2001 Ram Creation.
-******************************************************************************
-*/
+ **********************************************************************
+ * Copyright (C) 1997-2010, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ *
+ * File USCRIPT.H
+ *
+ * Modification History:
+ *
+ * Date Name Description
+ * 07/06/2001 Ram Creation.
+ ******************************************************************************
+ */
+
#ifndef USCRIPT_H
#define USCRIPT_H
#include "unicode/utypes.h"
*/
typedef enum UScriptCode {
USCRIPT_INVALID_CODE = -1,
- USCRIPT_COMMON = 0 , /* Zyyy */
- USCRIPT_INHERITED = 1, /* Qaai */
+ USCRIPT_COMMON = 0, /* Zyyy */
+ USCRIPT_INHERITED = 1, /* Zinh */ /* "Code for inherited script", for non-spacing combining marks; also Qaai */
USCRIPT_ARABIC = 2, /* Arab */
USCRIPT_ARMENIAN = 3, /* Armn */
USCRIPT_BENGALI = 4, /* Beng */
/** New script code in Unicode 4.0.1 @stable ICU 3.0 */
USCRIPT_KATAKANA_OR_HIRAGANA = 54,/*Hrkt */
-
-#ifndef U_HIDE_DRAFT_API
- /* New scripts in Unicode 4.1 @draft ICU 3.4 */
+
+ /* New scripts in Unicode 4.1 @stable ICU 3.4 */
USCRIPT_BUGINESE = 55, /* Bugi */
USCRIPT_GLAGOLITIC = 56, /* Glag */
USCRIPT_KHAROSHTHI = 57, /* Khar */
USCRIPT_TIFINAGH = 60, /* Tfng */
USCRIPT_OLD_PERSIAN = 61, /* Xpeo */
- /* New script codes from ISO 15924 @draft ICU 3.6 */
+ /* New script codes from ISO 15924 @stable ICU 3.6 */
USCRIPT_BALINESE = 62, /* Bali */
USCRIPT_BATAK = 63, /* Batk */
USCRIPT_BLISSYMBOLS = 64, /* Blis */
USCRIPT_LATIN_GAELIC = 81, /* Latg */
USCRIPT_LEPCHA = 82, /* Lepc */
USCRIPT_LINEAR_A = 83, /* Lina */
- USCRIPT_MANDAEAN = 84, /* Mand */
+ /** @stable ICU 4.6 */
+ USCRIPT_MANDAIC = 84, /* Mand */
+ /** @stable ICU 3.6 */
+ USCRIPT_MANDAEAN = USCRIPT_MANDAIC,
USCRIPT_MAYAN_HIEROGLYPHS = 85, /* Maya */
- USCRIPT_MEROITIC = 86, /* Mero */
+ /** @stable ICU 4.6 */
+ USCRIPT_MEROITIC_HIEROGLYPHS = 86, /* Mero */
+ /** @stable ICU 3.6 */
+ USCRIPT_MEROITIC = USCRIPT_MEROITIC_HIEROGLYPHS,
USCRIPT_NKO = 87, /* Nkoo */
USCRIPT_ORKHON = 88, /* Orkh */
USCRIPT_OLD_PERMIC = 89, /* Perm */
USCRIPT_EASTERN_SYRIAC = 97, /* Syrn */
USCRIPT_TENGWAR = 98, /* Teng */
USCRIPT_VAI = 99, /* Vaii */
- USCRIPT_VISIBLE_SPEECH = 100, /* Visp */
+ USCRIPT_VISIBLE_SPEECH = 100,/* Visp */
USCRIPT_CUNEIFORM = 101,/* Xsux */
USCRIPT_UNWRITTEN_LANGUAGES = 102,/* Zxxx */
USCRIPT_UNKNOWN = 103,/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */
- /* Private use codes from Qaaa - Qabx are not supported*/
-#endif /* U_HIDE_DRAFT_API */
- USCRIPT_CODE_LIMIT = 104
+
+ /* New script codes from ISO 15924 @stable ICU 3.8 */
+ USCRIPT_CARIAN = 104,/* Cari */
+ USCRIPT_JAPANESE = 105,/* Jpan */
+ USCRIPT_LANNA = 106,/* Lana */
+ USCRIPT_LYCIAN = 107,/* Lyci */
+ USCRIPT_LYDIAN = 108,/* Lydi */
+ USCRIPT_OL_CHIKI = 109,/* Olck */
+ USCRIPT_REJANG = 110,/* Rjng */
+ USCRIPT_SAURASHTRA = 111,/* Saur */
+ USCRIPT_SIGN_WRITING = 112,/* Sgnw */
+ USCRIPT_SUNDANESE = 113,/* Sund */
+ USCRIPT_MOON = 114,/* Moon */
+ USCRIPT_MEITEI_MAYEK = 115,/* Mtei */
+
+ /* New script codes from ISO 15924 @stable ICU 4.0 */
+ USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */
+ USCRIPT_AVESTAN = 117,/* Avst */
+ USCRIPT_CHAKMA = 118,/* Cakm */
+ USCRIPT_KOREAN = 119,/* Kore */
+ USCRIPT_KAITHI = 120,/* Kthi */
+ USCRIPT_MANICHAEAN = 121,/* Mani */
+ USCRIPT_INSCRIPTIONAL_PAHLAVI = 122,/* Phli */
+ USCRIPT_PSALTER_PAHLAVI = 123,/* Phlp */
+ USCRIPT_BOOK_PAHLAVI = 124,/* Phlv */
+ USCRIPT_INSCRIPTIONAL_PARTHIAN = 125,/* Prti */
+ USCRIPT_SAMARITAN = 126,/* Samr */
+ USCRIPT_TAI_VIET = 127,/* Tavt */
+ USCRIPT_MATHEMATICAL_NOTATION = 128,/* Zmth */
+ USCRIPT_SYMBOLS = 129,/* Zsym */
+
+ /* New script codes from ISO 15924 @stable ICU 4.4 */
+ USCRIPT_BAMUM = 130,/* Bamu */
+ USCRIPT_LISU = 131,/* Lisu */
+ USCRIPT_NAKHI_GEBA = 132,/* Nkgb */
+ USCRIPT_OLD_SOUTH_ARABIAN = 133,/* Sarb */
+
+ /* New script codes from ISO 15924 @stable ICU 4.6 */
+ USCRIPT_BASSA_VAH = 134,/* Bass */
+ USCRIPT_DUPLOYAN_SHORTAND = 135,/* Dupl */
+ USCRIPT_ELBASAN = 136,/* Elba */
+ USCRIPT_GRANTHA = 137,/* Gran */
+ USCRIPT_KPELLE = 138,/* Kpel */
+ USCRIPT_LOMA = 139,/* Loma */
+ USCRIPT_MENDE = 140,/* Mend */
+ USCRIPT_MEROITIC_CURSIVE = 141,/* Merc */
+ USCRIPT_OLD_NORTH_ARABIAN = 142,/* Narb */
+ USCRIPT_NABATAEAN = 143,/* Nbat */
+ USCRIPT_PALMYRENE = 144,/* Palm */
+ USCRIPT_SINDHI = 145,/* Sind */
+ USCRIPT_WARANG_CITI = 146,/* Wara */
+
+ /* Private use codes from Qaaa - Qabx are not supported */
+ USCRIPT_CODE_LIMIT = 147
} UScriptCode;
/**
U_STABLE const char* U_EXPORT2
uscript_getShortName(UScriptCode scriptCode);
-/**
+/**
* Gets the script code associated with the given codepoint.
* Returns USCRIPT_MALAYALAM given 0x0D02
* @param codepoint UChar32 codepoint
U_STABLE UScriptCode U_EXPORT2
uscript_getScript(UChar32 codepoint, UErrorCode *err);
+/**
+ * Is code point c used in script sc?
+ * That is, does code point c have the Script property value sc,
+ * or do code point c's Script_Extensions include script code sc?
+ *
+ * Some characters are commonly used in multiple scripts.
+ * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
+ *
+ * The Script_Extensions property is provisional. It may be modified or removed
+ * in future versions of the Unicode Standard, and thus in ICU.
+ * @param c code point
+ * @param sc script code
+ * @return TRUE if Script(c)==sc or sc is in Script_Extensions(c)
+ * @draft ICU 4.6
+ */
+U_DRAFT UBool U_EXPORT2
+uscript_hasScript(UChar32 c, UScriptCode sc);
+
+/**
+ * Writes code point c's Script_Extensions as a list of UScriptCode values
+ * to the output scripts array.
+ *
+ * Some characters are commonly used in multiple scripts.
+ * For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
+ *
+ * If there are more than capacity script codes to be written, then
+ * U_BUFFER_OVERFLOW_ERROR is set and the number of Script_Extensions is returned.
+ * (Usual ICU buffer handling behavior.)
+ *
+ * The Script_Extensions property is provisional. It may be modified or removed
+ * in future versions of the Unicode Standard, and thus in ICU.
+ * @param c code point
+ * @param scripts output script code array
+ * @param capacity capacity of the scripts array
+ * @param errorCode Standard ICU error code. Its input value must
+ * pass the U_SUCCESS() test, or else the function returns
+ * immediately. Check for U_FAILURE() on output or use with
+ * function chaining. (See User Guide for details.)
+ * @return number of script codes in c's Script_Extensions,
+ * written to scripts unless U_BUFFER_OVERFLOW_ERROR indicates insufficient capacity
+ * @draft ICU 4.6
+ */
+U_DRAFT int32_t U_EXPORT2
+uscript_getScriptExtensions(UChar32 c,
+ UScriptCode *scripts, int32_t capacity,
+ UErrorCode *pErrorCode);
+
#endif