.\" This is a wxWidgets manpage page generated from the XML docs .TH wxMBConv 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxMBConv \- .SH DESCRIPTION This class is the base class of a hierarchy of classes capable of converting text strings between multibyte (SBCS or DBCS) encodings and Unicode. It is itself a wrapper around the standard libc mbstowcs() and wcstombs() routines, and has one predefined instance, wxConvLibc . .SH "PARENTS" .SH "INCLUDE FILES" wx/strconv.h .SH MEMBERS .SS wxMBConv () Constructor. .SS virtual size_t MB2WC (wchar_t *outputBufconst char *pszsize_t outputSize) Converts from a string psz in multibyte encoding to Unicode putting the output into the buffer outputBuf of the maximum size outputSize (in wide characters, not bytes). If outputBuf is NULL , only the length of the string which would result from the conversion is calculated and returned. Note that this is the length and not size, i.e. the returned value does not include the trailing NUL. But when the function is called with a non- NULL outputBuf , the outputSize parameter should be the size of the buffer and so it should take into account the trailing NUL. .SS virtual size_t WC2MB (char* bufconst wchar_t* pszsize_t n) Converts from Unicode to multibyte encoding. The semantics of this function (including the return value meaning) is the same as for MB2WC . Notice that when the function is called with a non- NULL buffer, the n parameter should be the size of the buffer and so it should take into account the trailing NUL, which might take two or four bytes for some encodings (UTF-16 and UTF-32). .SS const wxWCharBuffer cMB2WC (const char* psz) Converts from multibyte encoding to Unicode by calling MB2WC, allocating a temporary wxWCharBuffer to hold the result. .SS const wxCharBuffer cWC2MB (const wchar_t* psz) Converts from Unicode to multibyte encoding by calling WC2MB, allocating a temporary wxCharBuffer to hold the result. .SS const char* cMB2WX (const char* psz) .SS const wxWCharBuffer cMB2WX (const char* psz) Converts from multibyte encoding to the current wxChar type (which depends on whether wxUSE_UNICODE is set to 1). If wxChar is char, it returns the parameter unaltered. If wxChar is wchar_t, it returns the result in a wxWCharBuffer. The macro wxMB2WXbuf is defined as the correct return type (without const). .SS const char* cWX2MB (const wxChar* psz) .SS const wxCharBuffer cWX2MB (const wxChar* psz) Converts from the current wxChar type to multibyte encoding. If wxChar is char, it returns the parameter unaltered. If wxChar is wchar_t, it returns the result in a wxCharBuffer. The macro wxWX2MBbuf is defined as the correct return type (without const). .SS const wchar_t* cWC2WX (const wchar_t* psz) .SS const wxCharBuffer cWC2WX (const wchar_t* psz) Converts from Unicode to the current wxChar type. If wxChar is wchar_t, it returns the parameter unaltered. If wxChar is char, it returns the result in a wxCharBuffer. The macro wxWC2WXbuf is defined as the correct return type (without const). .SS const wchar_t* cWX2WC (const wxChar* psz) .SS const wxWCharBuffer cWX2WC (const wxChar* psz) Converts from the current wxChar type to Unicode. If wxChar is wchar_t, it returns the parameter unaltered. If wxChar is char, it returns the result in a wxWCharBuffer. The macro wxWX2WCbuf is defined as the correct return type (without const). .SH "SEE ALSO" wxCSConv wxEncodingConverter wxMBConv classes overview .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.