![]() ![]() ![]() ![]() wxcsconvthis class converts between any character sets and unicode. it has one predefined instance, wxconvlocal, for the default user character set. derived from include files <wx/strconv.h> see also wxmbconv, wxencodingconverter, wxmbconv classes overview members
wxcsconv::wxcsconv
wxcsconv::wxcsconvwxcsconv(const wxchar* charset) wxcsconv(wxfontencoding encoding) constructor. you may specify either the name of the character set you want to convert from/to or an encoding constant. if the character set name (or the encoding) is not recognized, iso 8859-1 is used as fall back.
wxcsconv::~wxcsconv~wxcsconv() destructor frees any resources needed to perform the conversion.
wxcsconv::isokbool isok() const returns true if the charset (or the encoding) given at constructor is really available to use. returns false if iso 8859-1 will be used instead. note this does not mean that a given string will be correctly converted. a malformed string may still make conversion functions return wxconv_failed. this function is new since wxwidgets version 2.8.2
wxcsconv::mb2wcsize_t mb2wc(wchar_t* buf, const char* psz, size_t n) const converts from the selected character set to unicode. returns length of string written to destination buffer.
wxcsconv::wc2mbsize_t wc2mb(char* buf, const wchar_t* psz, size_t n) const converts from unicode to the selected character set. returns length of string written to destination buffer.
|