contents up previous next

wxmbconvutf8

this class converts between the utf-8 encoding and unicode. it has one predefined instance, wxconvutf8.

derived from

wxmbconv

include files

<wx/strconv.h>

see also

wxmbconvutf7, wxmbconv classes overview

remarks

utf-8 is a compatibility encoding used to encode unicode text into anything that was originally written for 8-bit strings, including (but not limited to) filenames, transfer protocols, and database fields. notable properties include:

all of these properties make utf-8 a very favorable solution in any situation where full unicode character support is desired while remaining compatible with code written with only 8-bit extended-ascii characters in mind.

members

wxmbconvutf8::mb2wc
wxmbconvutf8::wc2mb


wxmbconvutf8::mb2wc

size_t mb2wc(wchar_t* buf, const char* psz, size_t n) const

converts from utf-8 encoding to unicode. returns the size of the destination buffer.


wxmbconvutf8::wc2mb

size_t wc2mb(char* buf, const wchar_t* psz, size_t n) const

converts from unicode to utf-8 encoding. returns the size of the destination buffer.