#include <wx/strconv.h>
This class converts between the UTF-7 encoding and Unicode.
It has one predefined instance, wxConvUTF7.
Notice that, unlike all the other conversion objects, this converter is stateful, i.e. it remembers its state from the last call to its ToWChar() or FromWChar() and assumes it is called on the continuation of the same string when the same method is called again. This assumption is only made if an explicit length is specified as parameter to these functions as if an entire NUL
terminated string is processed the state doesn't need to be remembered.
This also means that, unlike the other predefined conversion objects, wxConvUTF7 is not thread-safe.
Additional Inherited Members | |
Public Member Functions inherited from wxMBConv | |
wxMBConv () | |
Trivial default constructor. More... | |
virtual wxMBConv * | Clone () const =0 |
This pure virtual function is overridden in each of the derived classes to return a new copy of the object it is called on. More... | |
virtual size_t | GetMaxCharLen () const |
This function must be overridden in the derived classes to return the maximum length, in bytes, of a single Unicode character representation in this encoding. More... | |
virtual size_t | GetMBNulLen () const |
This function returns 1 for most of the multibyte encodings in which the string is terminated by a single NUL , 2 for UTF-16 and 4 for UTF-32 for which the string is terminated with 2 and 4 NUL characters respectively. More... | |
virtual bool | IsUTF8 () const |
Return true if the converter's charset is UTF-8. More... | |
virtual size_t | ToWChar (wchar_t *dst, size_t dstLen, const char *src, size_t srcLen=wxNO_LEN) const |
Convert multibyte string to a wide character one. More... | |
virtual size_t | FromWChar (char *dst, size_t dstLen, const wchar_t *src, size_t srcLen=wxNO_LEN) const |
Converts wide character string to multibyte. More... | |
wxWCharBuffer | cMB2WC (const char *in, size_t inLen, size_t *outLen) const |
Converts from multibyte encoding to Unicode by calling ToWChar() and allocating a temporary wxWCharBuffer to hold the result. More... | |
wxWCharBuffer | cMB2WC (const wxCharBuffer &buf) const |
Converts a char buffer to wide char one. More... | |
wxWCharBuffer | cMB2WX (const char *psz) const |
Converts from multibyte encoding to wchar_t . More... | |
wxCharBuffer | cWC2MB (const wchar_t *in, size_t inLen, size_t *outLen) const |
Converts from Unicode to multibyte encoding by calling FromWChar() and allocating a temporary wxCharBuffer to hold the result. More... | |
wxCharBuffer | cWC2MB (const wxWCharBuffer &buf) const |
Converts a wide char buffer to char one. More... | |
virtual size_t | MB2WC (wchar_t *out, const char *in, size_t outLen) const |
virtual size_t | WC2MB (char *buf, const wchar_t *psz, size_t n) const |
const wchar_t * | cWC2WX (const wchar_t *psz) const |
Converts from Unicode to the current wxChar type. More... | |
wxCharBuffer | cWC2WX (const wchar_t *psz) const |
Converts from Unicode to the current wxChar type. More... | |
const char * | cWX2MB (const wxChar *psz) const |
Converts from the current wxChar type to multibyte encoding. More... | |
wxCharBuffer | cWX2MB (const wxChar *psz) const |
Converts from the current wxChar type to multibyte encoding. More... | |
const wchar_t * | cWX2WC (const wxChar *psz) const |
Converts from the current wxChar type to Unicode. More... | |
wxWCharBuffer | cWX2WC (const wxChar *psz) const |
Converts from the current wxChar type to Unicode. More... | |
Static Public Member Functions inherited from wxMBConv | |
static size_t | GetMaxMBNulLen () |
Returns the maximal value which can be returned by GetMBNulLen() for any conversion object. More... | |