OpenVPN 3 Core Library
|
Classes | |
class | UTF8Iterator |
Typedefs | |
typedef unsigned int | UTF32 |
typedef unsigned short | UTF16 |
typedef unsigned char | UTF8 |
Enumerations | |
enum | ConversionResult { conversionOK , sourceExhausted , targetExhausted , sourceIllegal } |
enum | ConversionFlags { strictConversion = 0 , lenientConversion } |
enum | { UTF8_NO_CTRL = (1 << 30) , UTF8_NO_SPACE = (1 << 31) } |
enum | { UTF8_GOOD = 0 , UTF8_BAD , UTF8_RANGE } |
enum | { UTF8_PASS_FMT = (1 << 31) , UTF8_FILTER = (1 << 30) } |
Functions | |
ConversionResult | ConvertUTF32toUTF16 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags) |
ConversionResult | ConvertUTF16toUTF32 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags) |
ConversionResult | ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags) |
bool | isLegalUTF8 (const UTF8 *source, int length) |
bool | isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd) |
ConversionResult | ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags) |
ConversionResult | ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags) |
ConversionResult | ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags) |
OPENVPN_SIMPLE_EXCEPTION (unicode_src_overflow) | |
OPENVPN_SIMPLE_EXCEPTION (unicode_dest_overflow) | |
OPENVPN_SIMPLE_EXCEPTION (unicode_malformed) | |
bool | is_valid_utf8_uchar_buf (const unsigned char *source, size_t size, const size_t max_len_flags=0) |
template<typename STRING > | |
bool | is_valid_utf8 (const STRING &str, const size_t max_len_flags=0) |
template<typename STRING > | |
int | utf8_index (STRING &str, size_t &index) |
template<typename STRING > | |
void | utf8_truncate (STRING &str, size_t max_len) |
template<typename STRING > | |
STRING | utf8_printable (const STRING &str, size_t max_len_flags) |
template<typename STRING > | |
size_t | utf8_length (const STRING &str) |
void | conversion_result_throw (const ConversionResult res) |
template<typename STRING > | |
BufferPtr | string_to_utf16 (const STRING &str) |
Variables | |
const UTF32 | UNI_REPLACEMENT_CHAR = (UTF32)0x0000FFFD |
const UTF32 | UNI_MAX_BMP = (UTF32)0x0000FFFF |
const UTF32 | UNI_MAX_UTF16 = (UTF32)0x0010FFFF |
const UTF32 | UNI_MAX_UTF32 = (UTF32)0x7FFFFFFF |
const UTF32 | UNI_MAX_LEGAL_UTF32 = (UTF32)0x0010FFFF |
const int | halfShift = 10 |
const UTF32 | halfBase = 0x0010000UL |
const UTF32 | halfMask = 0x3FFUL |
const UTF32 | UNI_SUR_HIGH_START = (UTF32)0xD800 |
const UTF32 | UNI_SUR_HIGH_END = (UTF32)0xDBFF |
const UTF32 | UNI_SUR_LOW_START = (UTF32)0xDC00 |
const UTF32 | UNI_SUR_LOW_END = (UTF32)0xDFFF |
const char | trailingBytesForUTF8 [256] |
const UTF32 | offsetsFromUTF8 [6] |
const UTF8 | firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } |
typedef unsigned short openvpn::Unicode::UTF16 |
Definition at line 96 of file unicode-impl.hpp.
typedef unsigned int openvpn::Unicode::UTF32 |
Definition at line 95 of file unicode-impl.hpp.
typedef unsigned char openvpn::Unicode::UTF8 |
Definition at line 97 of file unicode-impl.hpp.
anonymous enum |
Enumerator | |
---|---|
UTF8_NO_CTRL | |
UTF8_NO_SPACE |
Definition at line 36 of file unicode.hpp.
anonymous enum |
Enumerator | |
---|---|
UTF8_GOOD | |
UTF8_BAD | |
UTF8_RANGE |
Definition at line 82 of file unicode.hpp.
anonymous enum |
Enumerator | |
---|---|
UTF8_PASS_FMT | |
UTF8_FILTER |
Definition at line 123 of file unicode.hpp.
Enumerator | |
---|---|
strictConversion | |
lenientConversion |
Definition at line 113 of file unicode-impl.hpp.
Enumerator | |
---|---|
conversionOK | |
sourceExhausted | |
targetExhausted | |
sourceIllegal |
Definition at line 106 of file unicode-impl.hpp.
|
inline |
|
inline |
Definition at line 220 of file unicode-impl.hpp.
|
inline |
Definition at line 324 of file unicode-impl.hpp.
|
inline |
Definition at line 171 of file unicode-impl.hpp.
|
inline |
Definition at line 519 of file unicode-impl.hpp.
|
inline |
|
inline |
Definition at line 572 of file unicode-impl.hpp.
|
inline |
|
inline |
|
inline |
Definition at line 436 of file unicode-impl.hpp.
openvpn::Unicode::OPENVPN_SIMPLE_EXCEPTION | ( | unicode_dest_overflow | ) |
openvpn::Unicode::OPENVPN_SIMPLE_EXCEPTION | ( | unicode_malformed | ) |
openvpn::Unicode::OPENVPN_SIMPLE_EXCEPTION | ( | unicode_src_overflow | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 112 of file unicode.hpp.
const UTF8 openvpn::Unicode::firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC } |
Definition at line 310 of file unicode-impl.hpp.
const UTF32 openvpn::Unicode::halfBase = 0x0010000UL |
Definition at line 161 of file unicode-impl.hpp.
const UTF32 openvpn::Unicode::halfMask = 0x3FFUL |
Definition at line 162 of file unicode-impl.hpp.
const int openvpn::Unicode::halfShift = 10 |
Definition at line 159 of file unicode-impl.hpp.
const UTF32 openvpn::Unicode::offsetsFromUTF8[6] |
Definition at line 300 of file unicode-impl.hpp.
const char openvpn::Unicode::trailingBytesForUTF8[256] |
Definition at line 284 of file unicode-impl.hpp.
Definition at line 101 of file unicode-impl.hpp.
Definition at line 104 of file unicode-impl.hpp.
Definition at line 102 of file unicode-impl.hpp.
Definition at line 103 of file unicode-impl.hpp.
Definition at line 100 of file unicode-impl.hpp.
Definition at line 165 of file unicode-impl.hpp.
Definition at line 164 of file unicode-impl.hpp.
Definition at line 167 of file unicode-impl.hpp.
Definition at line 166 of file unicode-impl.hpp.