Logo Search packages:      
Sourcecode: icu version File versions

ucnv.h File Reference


Detailed Description

C API: Character conversion.

Character Conversion C API

Definition in file ucnv.h.

#include "unicode/utypes.h"
#include "unicode/ucnv_err.h"

Go to the source code of this file.

Defines

#define U_CNV_SAFECLONE_BUFFERSIZE   512
#define UCNV_LOCALE_OPTION_STRING   ",locale="
#define UCNV_MAX_CONVERTER_NAME_LENGTH   60
#define UCNV_MAX_FULL_FILE_NAME_LENGTH   (600+UCNV_MAX_CONVERTER_NAME_LENGTH)
#define UCNV_OPTION_SEP_CHAR   ','
#define UCNV_OPTION_SEP_STRING   ","
#define UCNV_SI   0x0F
#define UCNV_SO   0x0E
#define UCNV_VALUE_SEP_CHAR   '='
#define UCNV_VALUE_SEP_STRING   "="

Typedefs

typedef UConverterToUnicodeArgsargs
typedef
UConverterToUnicodeArgs const
char int32_t
UConverterCallbackReason
UErrorCode *typedef
UConverterFromUnicodeArgs
const UChar int32_t UChar32 
codePoint
typedef
UConverterToUnicodeArgs const
char * 
codePoints
typedef
UConverterToUnicodeArgs const
char int32_t
UConverterCallbackReason
UErrorCode *typedef
UConverterFromUnicodeArgs
const UChar
codeUnits
typedef
UConverterToUnicodeArgs const
char int32_t 
length
typedef
UConverterToUnicodeArgs const
char int32_t
UConverterCallbackReason 
reason
typedef struct UConverter UConverter

Enumerations

enum  UConverterPlatform { UCNV_UNKNOWN = -1, UCNV_IBM = 0 }
enum  UConverterType {
  UCNV_UNSUPPORTED_CONVERTER = -1, UCNV_SBCS = 0, UCNV_DBCS = 1, UCNV_MBCS = 2,
  UCNV_LATIN_1 = 3, UCNV_UTF8 = 4, UCNV_UTF16_BigEndian = 5, UCNV_UTF16_LittleEndian = 6,
  UCNV_UTF32_BigEndian = 7, UCNV_UTF32_LittleEndian = 8, UCNV_EBCDIC_STATEFUL = 9, UCNV_ISO_2022 = 10,
  UCNV_LMBCS_1 = 11, UCNV_LMBCS_2, UCNV_LMBCS_3, UCNV_LMBCS_4,
  UCNV_LMBCS_5, UCNV_LMBCS_6, UCNV_LMBCS_8, UCNV_LMBCS_11,
  UCNV_LMBCS_16, UCNV_LMBCS_17, UCNV_LMBCS_18, UCNV_LMBCS_19,
  UCNV_LMBCS_LAST = UCNV_LMBCS_19, UCNV_HZ, UCNV_SCSU, UCNV_ISCII,
  UCNV_US_ASCII, UCNV_UTF7, UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES
}

Functions

U_CAPI void U_EXPORT2 ucnv_close (UConverter *converter)
U_CAPI int U_EXPORT2 ucnv_compareNames (const char *name1, const char *name2)
U_CAPI int32_t U_EXPORT2 ucnv_convert (const char *toConverterName, const char *fromConverterName, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *err)
U_CAPI uint16_t U_EXPORT2 ucnv_countAliases (const char *alias, UErrorCode *pErrorCode)
U_CAPI int32_t U_EXPORT2 ucnv_countAvailable (void)
U_CAPI uint16_t U_EXPORT2 ucnv_countStandards (void)
U_CAPI const char *U_EXPORT2 ucnv_detectUnicodeSignature (const char *source, int32_t sourceLength, int32_t *signatureLength, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2 ucnv_fixFileSeparator (const UConverter *cnv, UChar *source, int32_t sourceLen)
U_CAPI int32_t U_EXPORT2 ucnv_flushCache (void)
U_CAPI int32_t U_EXPORT2 ucnv_fromUChars (UConverter *cnv, char *dest, int32_t destCapacity, const UChar *src, int32_t srcLength, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2 ucnv_fromUnicode (UConverter *converter, char **target, const char *targetLimit, const UChar **source, const UChar *sourceLimit, int32_t *offsets, UBool flush, UErrorCode *err)
U_CAPI const char *U_EXPORT2 ucnv_getAlias (const char *alias, uint16_t n, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2 ucnv_getAliases (const char *alias, const char **aliases, UErrorCode *pErrorCode)
U_CAPI const char *U_EXPORT2 ucnv_getAvailableName (int32_t n)
U_CAPI int32_t U_EXPORT2 ucnv_getCCSID (const UConverter *converter, UErrorCode *err)
U_CAPI const char *U_EXPORT2 ucnv_getDefaultName (void)
U_CAPI int32_t U_EXPORT2 ucnv_getDisplayName (const UConverter *converter, const char *displayLocale, UChar *displayName, int32_t displayNameCapacity, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_getFromUCallBack (const UConverter *converter, UConverterFromUCallback *action, const void **context)
U_CAPI void U_EXPORT2 ucnv_getInvalidChars (const UConverter *converter, char *errBytes, int8_t *len, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_getInvalidUChars (const UConverter *converter, UChar *errUChars, int8_t *len, UErrorCode *err)
U_CAPI int8_t U_EXPORT2 ucnv_getMaxCharSize (const UConverter *converter)
U_CAPI int8_t U_EXPORT2 ucnv_getMinCharSize (const UConverter *converter)
U_CAPI const char *U_EXPORT2 ucnv_getName (const UConverter *converter, UErrorCode *err)
U_CAPI UChar32 U_EXPORT2 ucnv_getNextUChar (UConverter *converter, const char **source, const char *sourceLimit, UErrorCode *err)
U_CAPI UConverterPlatform U_EXPORT2 ucnv_getPlatform (const UConverter *converter, UErrorCode *err)
U_CAPI const char *U_EXPORT2 ucnv_getStandard (uint16_t n, UErrorCode *pErrorCode)
U_CAPI const char *U_EXPORT2 ucnv_getStandardName (const char *name, const char *standard, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2 ucnv_getStarters (const UConverter *converter, UBool starters[256], UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_getSubstChars (const UConverter *converter, char *subChars, int8_t *len, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_getToUCallBack (const UConverter *converter, UConverterToUCallback *action, const void **context)
U_CAPI UConverterType U_EXPORT2 ucnv_getType (const UConverter *converter)
U_CAPI UBool U_EXPORT2 ucnv_isAmbiguous (const UConverter *cnv)
U_CAPI UConverter *U_EXPORT2 ucnv_open (const char *converterName, UErrorCode *err)
U_CAPI UConverter *U_EXPORT2 ucnv_openCCSID (int32_t codepage, UConverterPlatform platform, UErrorCode *err)
U_CAPI UConverter *U_EXPORT2 ucnv_openU (const UChar *name, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_reset (UConverter *converter)
U_CAPI void U_EXPORT2 ucnv_resetFromUnicode (UConverter *converter)
U_CAPI void U_EXPORT2 ucnv_resetToUnicode (UConverter *converter)
U_CAPI UConverter *U_EXPORT2 ucnv_safeClone (const UConverter *cnv, void *stackBuffer, int32_t *pBufferSize, UErrorCode *status)
U_CAPI void U_EXPORT2 ucnv_setDefaultName (const char *name)
U_CAPI void U_EXPORT2 ucnv_setFallback (UConverter *cnv, UBool usesFallback)
U_CAPI void U_EXPORT2 ucnv_setFromUCallBack (UConverter *converter, UConverterFromUCallback newAction, const void *newContext, UConverterFromUCallback *oldAction, const void **oldContext, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_setSubstChars (UConverter *converter, const char *subChars, int8_t len, UErrorCode *err)
U_CAPI void U_EXPORT2 ucnv_setToUCallBack (UConverter *converter, UConverterToUCallback newAction, const void *newContext, UConverterToUCallback *oldAction, const void **oldContext, UErrorCode *err)
U_CAPI int32_t U_EXPORT2 ucnv_toUChars (UConverter *cnv, UChar *dest, int32_t destCapacity, const char *src, int32_t srcLength, UErrorCode *pErrorCode)
U_CAPI void U_EXPORT2 ucnv_toUnicode (UConverter *converter, UChar **target, const UChar *targetLimit, const char **source, const char *sourceLimit, int32_t *offsets, UBool flush, UErrorCode *err)
U_CAPI UBool U_EXPORT2 ucnv_usesFallback (const UConverter *cnv)
typedef void (U_EXPORT2 *UConverterToUCallback)(const void *context


Generated by  Doxygen 1.6.0   Back to index