csUnicodeTransform Class Reference
[Utilities]
Contains functions to convert between several UTF encodings.
More...
#include <csutil/csuctransform.h>
Static Public Member Functions | |
UTF Decoders | |
static int | Decode (const utf32_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-32. | |
static int | Decode (const utf16_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-16. | |
static int | Decode (const utf8_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-8. | |
static int | UTF16Decode (const utf16_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-16. | |
static int | UTF32Decode (const utf32_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-32. | |
static int | UTF8Decode (const utf8_char *str, size_t strlen, utf32_char &ch, bool *isValid=0, bool returnNonChar=false) |
Decode an Unicode code point encoded in UTF-8. | |
UTF Encoders | |
static int | Encode (const utf32_char ch, utf32_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-32. | |
static int | Encode (const utf32_char ch, utf16_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-16. | |
static int | Encode (const utf32_char ch, utf8_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-8. | |
static int | EncodeUTF16 (const utf32_char ch, utf16_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-16. | |
static int | EncodeUTF32 (const utf32_char ch, utf32_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-32. | |
static int | EncodeUTF8 (const utf32_char ch, utf8_char *buf, size_t bufsize, bool allowNonchars=false) |
Encode an Unicode code point to UTF-8. | |
Code point mappings | |
static size_t | MapToFold (const utf32_char ch, utf32_char *dest, size_t destSize, uint flags=0) |
Map a code point to its fold equivalent(s). | |
static size_t | MapToLower (const utf32_char ch, utf32_char *dest, size_t destSize, uint flags=0) |
Map a code point to its lower case equivalent(s). | |
static size_t | MapToUpper (const utf32_char ch, utf32_char *dest, size_t destSize, uint flags=0) |
Map a code point to its upper case equivalent(s). | |
Helpers to skip encoded code units in different UTF encodings | |
static int | UTF16Rewind (const utf16_char *str, size_t maxRew) |
Determine how many code units in an UTF-16 buffer need to skipped back to get to the start of the previous encoded code point. | |
static int | UTF16Skip (const utf16_char *str, size_t maxSkip) |
Determine how many code units in an UTF-16 buffer need to be skipped to get to the next encoded char. | |
static int | UTF32Rewind (const utf32_char *str, size_t maxRew) |
Determine how many code units in an UTF-32 buffer need to skipped back to get to the start of the previous encoded code point. | |
static int | UTF32Skip (const utf32_char *str, size_t maxSkip) |
Determine how many code units in an UTF-32 buffer need to be skipped to get to the next encoded char. | |
static int | UTF8Rewind (const utf8_char *str, size_t maxRew) |
Determine how many code units in an UTF-8 buffer need to skipped back to get to the start of the previous encoded code point. | |
static int | UTF8Skip (const utf8_char *str, size_t maxSkip) |
Determine how many code units in an UTF-8 buffer need to be skipped to get to the next encoded char. | |
Converters between strings in different UTF encodings | |
static size_t | UTF16to32 (utf32_char *dest, size_t destSize, const utf16_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-16 to UTF-32. | |
static size_t | UTF16to8 (utf8_char *dest, size_t destSize, const utf16_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-16 to UTF-8. | |
static size_t | UTF32to16 (utf16_char *dest, size_t destSize, const utf32_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-32 to UTF-16. | |
static size_t | UTF32to8 (utf8_char *dest, size_t destSize, const utf32_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-32 to UTF-8. | |
static size_t | UTF8to16 (utf16_char *dest, size_t destSize, const utf8_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-8 to UTF-16. | |
static size_t | UTF8to32 (utf32_char *dest, size_t destSize, const utf8_char *source, size_t srcSize=(size_t)-1) |
Convert UTF-8 to UTF-32. |
Detailed Description
Contains functions to convert between several UTF encodings.
Definition at line 68 of file csuctransform.h.
Member Function Documentation
|
Decode an Unicode code point encoded in UTF-32.
Definition at line 284 of file csuctransform.h. References UTF32Decode(). |
|
Decode an Unicode code point encoded in UTF-16.
Definition at line 275 of file csuctransform.h. References UTF16Decode(). |
|
Decode an Unicode code point encoded in UTF-8.
Definition at line 266 of file csuctransform.h. References UTF8Decode(). Referenced by csFmtDefaultReader< T >::GetNext(). |
|
Encode an Unicode code point to UTF-32.
Definition at line 444 of file csuctransform.h. References EncodeUTF32(). |
|
Encode an Unicode code point to UTF-16.
Definition at line 435 of file csuctransform.h. References EncodeUTF16(). |
|
Encode an Unicode code point to UTF-8.
Definition at line 426 of file csuctransform.h. References EncodeUTF8(). Referenced by csFmtDefaultWriter< T >::Put(). |
|
Encode an Unicode code point to UTF-16.
Definition at line 377 of file csuctransform.h. References CS_UC_CHAR_HIGH_SURROGATE_FIRST, CS_UC_CHAR_LOW_SURROGATE_FIRST, CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, CS_UC_LAST_CHAR, and OUTPUT_CHAR. Referenced by Encode(). |
|
Encode an Unicode code point to UTF-32.
Definition at line 408 of file csuctransform.h. References CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, CS_UC_LAST_CHAR, and OUTPUT_CHAR. Referenced by Encode(). |
|
Encode an Unicode code point to UTF-8.
Definition at line 320 of file csuctransform.h. References CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, CS_UC_LAST_CHAR, and OUTPUT_CHAR. Referenced by Encode(). |
|
Map a code point to its fold equivalent(s). Fold mapping is useful for binary comparison of two Unicode strings.
|
|
Map a code point to its lower case equivalent(s).
|
|
Map a code point to its upper case equivalent(s).
|
|
Decode an Unicode code point encoded in UTF-16.
Definition at line 203 of file csuctransform.h. References CS_UC_IS_HIGH_SURROGATE, CS_UC_IS_LOW_SURROGATE, CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, FAIL, GET_NEXT, and SUCCEED. Referenced by Decode(). |
|
Determine how many code units in an UTF-16 buffer need to skipped back to get to the start of the previous encoded code point.
Definition at line 928 of file csuctransform.h. References CS_UC_IS_HIGH_SURROGATE, and CS_UC_IS_SURROGATE. |
|
Determine how many code units in an UTF-16 buffer need to be skipped to get to the next encoded char.
Definition at line 915 of file csuctransform.h. References CS_UC_IS_HIGH_SURROGATE. |
|
Convert UTF-16 to UTF-32.
Definition at line 538 of file csuctransform.h. |
|
Convert UTF-16 to UTF-8.
Definition at line 533 of file csuctransform.h. |
|
Decode an Unicode code point encoded in UTF-32.
Definition at line 246 of file csuctransform.h. References CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, CS_UC_LAST_CHAR, FAIL, GET_NEXT, and SUCCEED. Referenced by Decode(). |
|
Determine how many code units in an UTF-32 buffer need to skipped back to get to the start of the previous encoded code point.
Definition at line 959 of file csuctransform.h. |
|
Determine how many code units in an UTF-32 buffer need to be skipped to get to the next encoded char.
Definition at line 949 of file csuctransform.h. |
|
Convert UTF-32 to UTF-16.
Definition at line 549 of file csuctransform.h. |
|
Convert UTF-32 to UTF-8.
Definition at line 544 of file csuctransform.h. |
|
Decode an Unicode code point encoded in UTF-8.
Definition at line 112 of file csuctransform.h. References CS_UC_IS_NONCHARACTER, CS_UC_IS_SURROGATE, CS_UC_LAST_CHAR, FAIL, GET_NEXT, and SUCCEED. Referenced by Decode(), and csG2DDrawText< Tpixel, Tpixmixer1, Tpixmixer2, Tpixmixer3 >::DrawText(). |
|
Determine how many code units in an UTF-8 buffer need to skipped back to get to the start of the previous encoded code point.
Definition at line 888 of file csuctransform.h. |
|
Determine how many code units in an UTF-8 buffer need to be skipped to get to the next encoded char.
Definition at line 847 of file csuctransform.h. |
|
Convert UTF-8 to UTF-16.
Definition at line 522 of file csuctransform.h. |
|
Convert UTF-8 to UTF-32.
Definition at line 527 of file csuctransform.h. |
The documentation for this class was generated from the following file:
- csutil/csuctransform.h
Generated for Crystal Space by doxygen 1.4.4