OLD | NEW |
1 /* | 1 /* |
2 ********************************************************************** | 2 ********************************************************************** |
3 * Copyright (C) 1997-2014, International Business Machines | 3 * Copyright (C) 1997-2015, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************** | 5 ********************************************************************** |
6 * | 6 * |
7 * File USCRIPT.H | 7 * File USCRIPT.H |
8 * | 8 * |
9 * Modification History: | 9 * Modification History: |
10 * | 10 * |
11 * Date Name Description | 11 * Date Name Description |
12 * 07/06/2001 Ram Creation. | 12 * 07/06/2001 Ram Creation. |
13 ****************************************************************************** | 13 ****************************************************************************** |
14 */ | 14 */ |
15 | 15 |
16 #ifndef USCRIPT_H | 16 #ifndef USCRIPT_H |
17 #define USCRIPT_H | 17 #define USCRIPT_H |
18 #include "unicode/utypes.h" | 18 #include "unicode/utypes.h" |
19 | 19 |
20 /** | 20 /** |
21 * \file | 21 * \file |
22 * \brief C API: Unicode Script Information | 22 * \brief C API: Unicode Script Information |
23 */ | 23 */ |
24 | 24 |
25 /** | 25 /** |
26 * Constants for ISO 15924 script codes. | 26 * Constants for ISO 15924 script codes. |
27 * | 27 * |
28 * Many of these script codes - those from Unicode's ScriptNames.txt - | 28 * The current set of script code constants supports at least all scripts |
29 * are character property values for Unicode's Script property. | 29 * that are encoded in the version of Unicode which ICU currently supports. |
30 * See UAX #24 Script Names (http://www.unicode.org/reports/tr24/). | 30 * The names of the constants are usually derived from the |
| 31 * Unicode script property value aliases. |
| 32 * See UAX #24 Unicode Script Property (http://www.unicode.org/reports/tr24/) |
| 33 * and http://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt . |
31 * | 34 * |
32 * Starting with ICU 3.6, constants for most ISO 15924 script codes | 35 * Starting with ICU 3.6, constants for most ISO 15924 script codes |
33 * are included (currently excluding private-use codes Qaaa..Qabx). | 36 * are included, for use with language tags, CLDR data, and similar. |
34 * For scripts for which there are codes in ISO 15924 but which are not | 37 * Some of those codes are not used in the Unicode Character Database (UCD). |
35 * used in the Unicode Character Database (UCD), there are no Unicode characters | 38 * For example, there are no characters that have a UCD script property value of |
36 * associated with those scripts. | 39 * Hans or Hant. All Han ideographs have the Hani script property value in Unico
de. |
37 * | 40 * |
38 * For example, there are no characters that have a UCD script code of | 41 * Private-use codes Qaaa..Qabx are not included. |
39 * Hans or Hant. All Han ideographs have the Hani script code. | |
40 * The Hans and Hant script codes are used with CLDR data. | |
41 * | 42 * |
42 * ISO 15924 script codes are included for use with CLDR and similar. | 43 * Starting with ICU 55, script codes are only added when their scripts |
| 44 * have been or will certainly be encoded in Unicode, |
| 45 * and have been assigned Unicode script property value aliases, |
| 46 * to ensure that their script names are stable and match the names of the const
ants. |
| 47 * Script codes like Latf and Aran that are not subject to separate encoding |
| 48 * may be added at any time. |
43 * | 49 * |
44 * @stable ICU 2.2 | 50 * @stable ICU 2.2 |
45 */ | 51 */ |
46 typedef enum UScriptCode { | 52 typedef enum UScriptCode { |
47 /* | 53 /* |
48 * Note: UScriptCode constants and their ISO script code comments | 54 * Note: UScriptCode constants and their ISO script code comments |
49 * are parsed by preparseucd.py. | 55 * are parsed by preparseucd.py. |
50 * It matches lines like | 56 * It matches lines like |
51 * USCRIPT_<Unicode Script value name> = <integer>, / * <ISO script cod
e> * / | 57 * USCRIPT_<Unicode Script value name> = <integer>, / * <ISO script cod
e> * / |
52 */ | 58 */ |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 /** @stable ICU 3.8 */ | 293 /** @stable ICU 3.8 */ |
288 USCRIPT_LYCIAN = 107,/* Lyci */ | 294 USCRIPT_LYCIAN = 107,/* Lyci */ |
289 /** @stable ICU 3.8 */ | 295 /** @stable ICU 3.8 */ |
290 USCRIPT_LYDIAN = 108,/* Lydi */ | 296 USCRIPT_LYDIAN = 108,/* Lydi */ |
291 /** @stable ICU 3.8 */ | 297 /** @stable ICU 3.8 */ |
292 USCRIPT_OL_CHIKI = 109,/* Olck */ | 298 USCRIPT_OL_CHIKI = 109,/* Olck */ |
293 /** @stable ICU 3.8 */ | 299 /** @stable ICU 3.8 */ |
294 USCRIPT_REJANG = 110,/* Rjng */ | 300 USCRIPT_REJANG = 110,/* Rjng */ |
295 /** @stable ICU 3.8 */ | 301 /** @stable ICU 3.8 */ |
296 USCRIPT_SAURASHTRA = 111,/* Saur */ | 302 USCRIPT_SAURASHTRA = 111,/* Saur */ |
297 /** @stable ICU 3.8 */ | 303 /** Sutton SignWriting @stable ICU 3.8 */ |
298 USCRIPT_SIGN_WRITING = 112,/* Sgnw */ | 304 USCRIPT_SIGN_WRITING = 112,/* Sgnw */ |
299 /** @stable ICU 3.8 */ | 305 /** @stable ICU 3.8 */ |
300 USCRIPT_SUNDANESE = 113,/* Sund */ | 306 USCRIPT_SUNDANESE = 113,/* Sund */ |
301 /** @stable ICU 3.8 */ | 307 /** @stable ICU 3.8 */ |
302 USCRIPT_MOON = 114,/* Moon */ | 308 USCRIPT_MOON = 114,/* Moon */ |
303 /** @stable ICU 3.8 */ | 309 /** @stable ICU 3.8 */ |
304 USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ | 310 USCRIPT_MEITEI_MAYEK = 115,/* Mtei */ |
305 | 311 |
306 /** @stable ICU 4.0 */ | 312 /** @stable ICU 4.0 */ |
307 USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ | 313 USCRIPT_IMPERIAL_ARAMAIC = 116,/* Armi */ |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 USCRIPT_HATRAN = 162,/* Hatr */ | 417 USCRIPT_HATRAN = 162,/* Hatr */ |
412 /** @stable ICU 54 */ | 418 /** @stable ICU 54 */ |
413 USCRIPT_MODI = 163,/* Modi */ | 419 USCRIPT_MODI = 163,/* Modi */ |
414 /** @stable ICU 54 */ | 420 /** @stable ICU 54 */ |
415 USCRIPT_MULTANI = 164,/* Mult */ | 421 USCRIPT_MULTANI = 164,/* Mult */ |
416 /** @stable ICU 54 */ | 422 /** @stable ICU 54 */ |
417 USCRIPT_PAU_CIN_HAU = 165,/* Pauc */ | 423 USCRIPT_PAU_CIN_HAU = 165,/* Pauc */ |
418 /** @stable ICU 54 */ | 424 /** @stable ICU 54 */ |
419 USCRIPT_SIDDHAM = 166,/* Sidd */ | 425 USCRIPT_SIDDHAM = 166,/* Sidd */ |
420 | 426 |
421 /* Private use codes from Qaaa - Qabx are not supported */ | 427 /** |
422 | 428 * One higher than the last script code constant. |
423 /** @stable ICU 2.2 */ | 429 * This value increases as constants for script codes are added. |
| 430 * |
| 431 * There are constants for Unicode 7 script property values. |
| 432 * There are constants for ISO 15924 script codes assigned on or before 20
13-10-12. |
| 433 * There are no constants for private use codes from Qaaa - Qabx |
| 434 * except as used in the UCD. |
| 435 * |
| 436 * @stable ICU 2.2 |
| 437 */ |
424 USCRIPT_CODE_LIMIT = 167 | 438 USCRIPT_CODE_LIMIT = 167 |
425 } UScriptCode; | 439 } UScriptCode; |
426 | 440 |
427 /** | 441 /** |
428 * Gets the script codes associated with the given locale or ISO 15924 abbreviat
ion or name. | 442 * Gets the script codes associated with the given locale or ISO 15924 abbreviat
ion or name. |
429 * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". | 443 * Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". |
430 * Fills in USCRIPT_LATIN given "en" OR "en_US" | 444 * Fills in USCRIPT_LATIN given "en" OR "en_US" |
431 * If the required capacity is greater than the capacity of the destination buff
er, | 445 * If the required capacity is greater than the capacity of the destination buff
er, |
432 * then the error code is set to U_BUFFER_OVERFLOW_ERROR and the required capaci
ty is returned. | 446 * then the error code is set to U_BUFFER_OVERFLOW_ERROR and the required capaci
ty is returned. |
433 * | 447 * |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 * For example, Latn and Cyrl. | 647 * For example, Latn and Cyrl. |
634 * | 648 * |
635 * @param script script code | 649 * @param script script code |
636 * @return TRUE if the script is cased | 650 * @return TRUE if the script is cased |
637 * @stable ICU 51 | 651 * @stable ICU 51 |
638 */ | 652 */ |
639 U_STABLE UBool U_EXPORT2 | 653 U_STABLE UBool U_EXPORT2 |
640 uscript_isCased(UScriptCode script); | 654 uscript_isCased(UScriptCode script); |
641 | 655 |
642 #endif | 656 #endif |
OLD | NEW |