#include <CUnicode.h>
Static Public Member Functions | |
accessors | |
static bool | isUTF8 (const CString &) |
Test UTF-8 string for validity. | |
static CString | UTF8ToUCS2 (const CString &, bool *errors=NULL) |
Convert from UTF-8 to UCS-2 encoding. | |
static CString | UTF8ToUCS4 (const CString &, bool *errors=NULL) |
Convert from UTF-8 to UCS-4 encoding. | |
static CString | UTF8ToUTF16 (const CString &, bool *errors=NULL) |
Convert from UTF-8 to UTF-16 encoding. | |
static CString | UTF8ToUTF32 (const CString &, bool *errors=NULL) |
Convert from UTF-8 to UTF-32 encoding. | |
static CString | UTF8ToText (const CString &, bool *errors=NULL) |
Convert from UTF-8 to the current locale encoding. | |
static CString | UCS2ToUTF8 (const CString &, bool *errors=NULL) |
Convert from UCS-2 to UTF-8. | |
static CString | UCS4ToUTF8 (const CString &, bool *errors=NULL) |
Convert from UCS-4 to UTF-8. | |
static CString | UTF16ToUTF8 (const CString &, bool *errors=NULL) |
Convert from UTF-16 to UTF-8. | |
static CString | UTF32ToUTF8 (const CString &, bool *errors=NULL) |
Convert from UTF-32 to UTF-8. | |
static CString | textToUTF8 (const CString &, bool *errors=NULL) |
Convert from the current locale encoding to UTF-8. |
This class provides functions for converting between various Unicode encodings and the current locale encoding.
Definition at line 26 of file CUnicode.h.
bool CUnicode::isUTF8 | ( | const CString & | ) | [static] |
Test UTF-8 string for validity.
Returns true iff the string contains a valid sequence of UTF-8 encoded characters.
Definition at line 96 of file CUnicode.cpp.
Referenced by CXWindowsClipboardTextConverter::toIClipboard().
CString CUnicode::textToUTF8 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from the current locale encoding to UTF-8.
Convert from the current locale encoding to UTF-8. If errors is not NULL then *errors is set to true iff any character could not be decoded.
Definition at line 295 of file CUnicode.cpp.
Referenced by CMSWindowsClipboardTextConverter::doToIClipboard(), and CXWindowsClipboardTextConverter::toIClipboard().
CString CUnicode::UCS2ToUTF8 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UCS-2 to UTF-8.
Convert from UCS-2 to UTF-8. If errors is not NULL then *errors is set to true iff any character could not be decoded.
Definition at line 251 of file CUnicode.cpp.
Referenced by CXWindowsClipboardUCS2Converter::toIClipboard().
CString CUnicode::UCS4ToUTF8 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UCS-4 to UTF-8.
Convert from UCS-4 to UTF-8. If errors is not NULL then *errors is set to true iff any character could not be decoded.
Definition at line 262 of file CUnicode.cpp.
CString CUnicode::UTF16ToUTF8 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-16 to UTF-8.
Convert from UTF-16 to UTF-8. If errors is not NULL then *errors is set to true iff any character could not be decoded.
Definition at line 273 of file CUnicode.cpp.
Referenced by COSXClipboardUTF16Converter::doToIClipboard(), CMSWindowsClipboardUTF16Converter::doToIClipboard(), and CXWindowsClipboardHTMLConverter::toIClipboard().
CString CUnicode::UTF32ToUTF8 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-32 to UTF-8.
Convert from UTF-32 to UTF-8. If errors is not NULL then *errors is set to true iff any character could not be decoded.
Definition at line 284 of file CUnicode.cpp.
CString CUnicode::UTF8ToText | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-8 to the current locale encoding.
Convert from UTF-8 to the current locale encoding. If errors is not NULL then *errors is set to true iff any character could not be encoded. Decoding errors do not set *errors.
Definition at line 228 of file CUnicode.cpp.
Referenced by CMSWindowsClipboardTextConverter::doFromIClipboard(), and CXWindowsClipboardTextConverter::fromIClipboard().
CString CUnicode::UTF8ToUCS2 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-8 to UCS-2 encoding.
Convert from UTF-8 to UCS-2. If errors is not NULL then *errors is set to true iff any character could not be encoded in UCS-2. Decoding errors do not set *errors.
Definition at line 109 of file CUnicode.cpp.
Referenced by CXWindowsClipboardUCS2Converter::fromIClipboard().
CString CUnicode::UTF8ToUCS4 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-8 to UCS-4 encoding.
Convert from UTF-8 to UCS-4. If errors is not NULL then *errors is set to true iff any character could not be encoded in UCS-4. Decoding errors do not set *errors.
Definition at line 138 of file CUnicode.cpp.
CString CUnicode::UTF8ToUTF16 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-8 to UTF-16 encoding.
Convert from UTF-8 to UTF-16. If errors is not NULL then *errors is set to true iff any character could not be encoded in UTF-16. Decoding errors do not set *errors.
Definition at line 162 of file CUnicode.cpp.
Referenced by COSXClipboardUTF16Converter::doFromIClipboard(), CMSWindowsClipboardUTF16Converter::doFromIClipboard(), and CXWindowsClipboardHTMLConverter::fromIClipboard().
CString CUnicode::UTF8ToUTF32 | ( | const CString & | , | |
bool * | errors = NULL | |||
) | [static] |
Convert from UTF-8 to UTF-32 encoding.
Convert from UTF-8 to UTF-32. If errors is not NULL then *errors is set to true iff any character could not be encoded in UTF-32. Decoding errors do not set *errors.
Definition at line 200 of file CUnicode.cpp.