NIM 跨平台 C++ SDK
载入中...
搜索中...
未找到
convert_utf.h 文件参考

浏览源代码.

宏定义

#define UNI_REPLACEMENT_CHAR   (UTF32)0x0000FFFD
 
#define UNI_MAX_BMP   (UTF32)0x0000FFFF
 
#define UNI_MAX_UTF16   (UTF32)0x0010FFFF
 
#define UNI_MAX_UTF32   (UTF32)0x7FFFFFFF
 
#define UNI_MAX_LEGAL_UTF32   (UTF32)0x0010FFFF
 

类型定义

typedef unsigned int UTF32
 
typedef unsigned short UTF16
 
typedef unsigned char UTF8
 
typedef unsigned char Boolean
 

枚举

enum  ConversionResult { conversionOK , sourceExhausted , targetExhausted , sourceIllegal }
 
enum  ConversionFlags { strictConversion = 0 , lenientConversion }
 

函数

ConversionResult ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF16toUTF32 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 
ConversionResult ConvertUTF32toUTF16 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
 
Boolean isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
 

宏定义说明

◆ UNI_MAX_BMP

#define UNI_MAX_BMP   (UTF32)0x0000FFFF

◆ UNI_MAX_LEGAL_UTF32

#define UNI_MAX_LEGAL_UTF32   (UTF32)0x0010FFFF

◆ UNI_MAX_UTF16

#define UNI_MAX_UTF16   (UTF32)0x0010FFFF

◆ UNI_MAX_UTF32

#define UNI_MAX_UTF32   (UTF32)0x7FFFFFFF

◆ UNI_REPLACEMENT_CHAR

#define UNI_REPLACEMENT_CHAR   (UTF32)0x0000FFFD

类型定义说明

◆ Boolean

typedef unsigned char Boolean

◆ UTF16

typedef unsigned short UTF16

◆ UTF32

typedef unsigned int UTF32

◆ UTF8

typedef unsigned char UTF8

枚举类型说明

◆ ConversionFlags

枚举值
strictConversion 
lenientConversion 

◆ ConversionResult

枚举值
conversionOK 
sourceExhausted 
targetExhausted 
sourceIllegal 

函数说明

◆ ConvertUTF16toUTF32()

ConversionResult ConvertUTF16toUTF32 ( const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF16toUTF8()

ConversionResult ConvertUTF16toUTF8 ( const UTF16 **  sourceStart,
const UTF16 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF32toUTF16()

ConversionResult ConvertUTF32toUTF16 ( const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF32toUTF8()

ConversionResult ConvertUTF32toUTF8 ( const UTF32 **  sourceStart,
const UTF32 sourceEnd,
UTF8 **  targetStart,
UTF8 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF8toUTF16()

ConversionResult ConvertUTF8toUTF16 ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF16 **  targetStart,
UTF16 targetEnd,
ConversionFlags  flags 
)

◆ ConvertUTF8toUTF32()

ConversionResult ConvertUTF8toUTF32 ( const UTF8 **  sourceStart,
const UTF8 sourceEnd,
UTF32 **  targetStart,
UTF32 targetEnd,
ConversionFlags  flags 
)

◆ isLegalUTF8Sequence()

Boolean isLegalUTF8Sequence ( const UTF8 source,
const UTF8 sourceEnd 
)