uscript.h File Reference

C API: Unicode Script Information. More...

#include "unicode/utypes.h"

Go to the source code of this file.

Typedefs

typedef enum UScriptCode UScriptCode
 Constants for Unicode script values from ScriptNames.txt.

Enumerations

enum  UScriptCode {
  USCRIPT_INVALID_CODE = -1, USCRIPT_COMMON = 0, USCRIPT_INHERITED = 1, USCRIPT_ARABIC = 2,
  USCRIPT_ARMENIAN = 3, USCRIPT_BENGALI = 4, USCRIPT_BOPOMOFO = 5, USCRIPT_CHEROKEE = 6,
  USCRIPT_COPTIC = 7, USCRIPT_CYRILLIC = 8, USCRIPT_DESERET = 9, USCRIPT_DEVANAGARI = 10,
  USCRIPT_ETHIOPIC = 11, USCRIPT_GEORGIAN = 12, USCRIPT_GOTHIC = 13, USCRIPT_GREEK = 14,
  USCRIPT_GUJARATI = 15, USCRIPT_GURMUKHI = 16, USCRIPT_HAN = 17, USCRIPT_HANGUL = 18,
  USCRIPT_HEBREW = 19, USCRIPT_HIRAGANA = 20, USCRIPT_KANNADA = 21, USCRIPT_KATAKANA = 22,
  USCRIPT_KHMER = 23, USCRIPT_LAO = 24, USCRIPT_LATIN = 25, USCRIPT_MALAYALAM = 26,
  USCRIPT_MONGOLIAN = 27, USCRIPT_MYANMAR = 28, USCRIPT_OGHAM = 29, USCRIPT_OLD_ITALIC = 30,
  USCRIPT_ORIYA = 31, USCRIPT_RUNIC = 32, USCRIPT_SINHALA = 33, USCRIPT_SYRIAC = 34,
  USCRIPT_TAMIL = 35, USCRIPT_TELUGU = 36, USCRIPT_THAANA = 37, USCRIPT_THAI = 38,
  USCRIPT_TIBETAN = 39, USCRIPT_CANADIAN_ABORIGINAL = 40, USCRIPT_UCAS = USCRIPT_CANADIAN_ABORIGINAL, USCRIPT_YI = 41,
  USCRIPT_TAGALOG = 42, USCRIPT_HANUNOO = 43, USCRIPT_BUHID = 44, USCRIPT_TAGBANWA = 45,
  USCRIPT_BRAILLE, USCRIPT_CYPRIOT, USCRIPT_LIMBU, USCRIPT_LINEAR_B,
  USCRIPT_OSMANYA, USCRIPT_SHAVIAN, USCRIPT_TAI_LE, USCRIPT_UGARITIC,
  USCRIPT_KATAKANA_OR_HIRAGANA, USCRIPT_BUGINESE, USCRIPT_GLAGOLITIC, USCRIPT_KHAROSHTHI,
  USCRIPT_SYLOTI_NAGRI, USCRIPT_NEW_TAI_LUE, USCRIPT_TIFINAGH, USCRIPT_OLD_PERSIAN,
  USCRIPT_CODE_LIMIT
}
 Constants for Unicode script values from ScriptNames.txt. More...

Functions

U_STABLE int32_t U_EXPORT2 uscript_getCode (const char *nameOrAbbrOrLocale, UScriptCode *fillIn, int32_t capacity, UErrorCode *err)
 Gets script codes associated with the given locale or ISO 15924 abbreviation or name.
U_STABLE const char *U_EXPORT2 uscript_getName (UScriptCode scriptCode)
 Gets a script name associated with the given script code.
U_STABLE const char *U_EXPORT2 uscript_getShortName (UScriptCode scriptCode)
 Gets a script name associated with the given script code.
U_STABLE UScriptCode U_EXPORT2 uscript_getScript (UChar32 codepoint, UErrorCode *err)
 Gets the script code associated with the given codepoint.


Detailed Description

C API: Unicode Script Information.

Definition in file uscript.h.


Typedef Documentation

typedef enum UScriptCode UScriptCode
 

Constants for Unicode script values from ScriptNames.txt.

Stable:
ICU 2.2


Enumeration Type Documentation

enum UScriptCode
 

Constants for Unicode script values from ScriptNames.txt.

Stable:
ICU 2.2
Enumerator:
USCRIPT_CANADIAN_ABORIGINAL  Canadian_Aboriginal script.

Stable:
ICU 2.6
USCRIPT_UCAS  Canadian_Aboriginal script (alias).

Stable:
ICU 2.2
USCRIPT_KATAKANA_OR_HIRAGANA  New script code in Unicode 4.0.1.

Draft:
This API may be changed in the future versions and was introduced in ICU 3.0

Definition at line 29 of file uscript.h.


Function Documentation

U_STABLE int32_t U_EXPORT2 uscript_getCode const char *  nameOrAbbrOrLocale,
UScriptCode fillIn,
int32_t  capacity,
UErrorCode err
 

Gets script codes associated with the given locale or ISO 15924 abbreviation or name.

Fills in USCRIPT_MALAYALAM given "Malayam" OR "Mlym". Fills in USCRIPT_LATIN given "en" OR "en_US" If required capacity is greater than capacity of the destination buffer then the error code is set to U_BUFFER_OVERFLOW_ERROR and the required capacity is returned

Note: To search by short or long script alias only, use u_getPropertyValueEnum(UCHAR_SCRIPT, alias) instead. This does a fast lookup with no access of the locale data.

Parameters:
nameOrAbbrOrLocale name of the script, as given in PropertyValueAliases.txt, or ISO 15924 code or locale
fillIn the UScriptCode buffer to fill in the script code
capacity the capacity (size) fo UScriptCode buffer passed in.
err the error status code.
Returns:
The number of script codes filled in the buffer passed in
Stable:
ICU 2.4

U_STABLE const char* U_EXPORT2 uscript_getName UScriptCode  scriptCode  ) 
 

Gets a script name associated with the given script code.

Returns "Malayam" given USCRIPT_MALAYALAM

Parameters:
scriptCode UScriptCode enum
Returns:
script long name as given in PropertyValueAliases.txt, or NULL if scriptCode is invalid
Stable:
ICU 2.4

U_STABLE UScriptCode U_EXPORT2 uscript_getScript UChar32  codepoint,
UErrorCode err
 

Gets the script code associated with the given codepoint.

Returns USCRIPT_MALAYALAM given 0x0D02

Parameters:
codepoint UChar32 codepoint
err the error status code.
Returns:
The UScriptCode, or 0 if codepoint is invalid
Stable:
ICU 2.4

U_STABLE const char* U_EXPORT2 uscript_getShortName UScriptCode  scriptCode  ) 
 

Gets a script name associated with the given script code.

Returns "Mlym" given USCRIPT_MALAYALAM

Parameters:
scriptCode UScriptCode enum
Returns:
script abbreviated name as given in PropertyValueAliases.txt, or NULL if scriptCode is invalid
Stable:
ICU 2.4


Generated on Tue Feb 28 01:37:42 2006 for ICU 3.4 by  doxygen 1.4.4