libgpac
Documentation of the core library of GPAC
|
#include <gpac/utf.h>
Macros | |
#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 |
#define | UNI_SUR_HIGH_START (UTF32)0xD800 |
#define | UNI_SUR_HIGH_END (UTF32)0xDBFF |
#define | UNI_SUR_LOW_START (UTF32)0xDC00 |
#define | UNI_SUR_LOW_END (UTF32)0xDFFF |
#define | false 0 |
#define | true 1 |
Typedefs | |
typedef u32 | UTF32 |
typedef u16 | UTF16 |
typedef u8 | UTF8 |
typedef u8 | Boolean |
Enumerations | |
enum | ConversionResult { conversionOK , sourceExhausted , targetExhausted , sourceIllegal } |
enum | ConversionFlags { strictConversion = 0 , lenientConversion } |
Functions | |
ConversionResult | ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags) |
Boolean | isLegalUTF8 (const UTF8 *source, int length) |
ConversionResult | ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags) |
GF_EXPORT Bool | gf_utf8_is_legal (const u8 *data, u32 length) |
Checks validity of a UTF8 string. More... | |
GF_EXPORT u32 | gf_utf8_wcslen (const unsigned short *s) |
wide-char string length More... | |
GF_EXPORT u32 | gf_utf8_wcstombs (char *dest, size_t len, const unsigned short **srcp) |
wide-char to multibyte conversion More... | |
GF_EXPORT u32 | gf_utf8_mbstowcs (unsigned short *dest, size_t len, const char **srcp) |
multibyte to wide-char conversion More... | |
GF_EXPORT GF_Err | gf_utf_get_string_from_bom (const u8 *data, u32 size, char **out_ptr, char **result, u32 *res_size) |
returns a string from a string started with BOM More... | |
Variables | |
static const int | halfShift = 10 |
static const UTF32 | halfBase = 0x0010000UL |
static const UTF32 | halfMask = 0x3FFUL |
static const char | trailingBytesForUTF8 [256] |
static const UTF32 | offsetsFromUTF8 [6] |
static const UTF8 | firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } |
#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 |
#define UNI_SUR_HIGH_START (UTF32)0xD800 |
#define UNI_SUR_HIGH_END (UTF32)0xDBFF |
#define UNI_SUR_LOW_START (UTF32)0xDC00 |
#define UNI_SUR_LOW_END (UTF32)0xDFFF |
#define false 0 |
#define true 1 |
enum ConversionResult |
enum ConversionFlags |
ConversionResult ConvertUTF16toUTF8 | ( | const UTF16 ** | sourceStart, |
const UTF16 * | sourceEnd, | ||
UTF8 ** | targetStart, | ||
UTF8 * | targetEnd, | ||
ConversionFlags | flags | ||
) |
ConversionResult ConvertUTF8toUTF16 | ( | const UTF8 ** | sourceStart, |
const UTF8 * | sourceEnd, | ||
UTF16 ** | targetStart, | ||
UTF16 * | targetEnd, | ||
ConversionFlags | flags | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |