wxMBConvUTF16 Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
List of all members
wxMBConvUTF16 Class Reference
Class List by Category » Text Conversion

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/strconv.h>`

Inheritance diagram for wxMBConvUTF16:
[legend]

## Detailed Description

This class is used to convert between multibyte encodings and UTF-16 Unicode encoding (also known as UCS-2).

Unlike UTF-8 encoding, UTF-16 uses words and not bytes and hence depends on the byte ordering: big or little endian. Hence this class is provided in two versions: wxMBConvUTF16LE and wxMBConvUTF16BE and wxMBConvUTF16 itself is just a typedef for one of them (native for the given platform, e.g. LE under Windows and BE under Mac).

##

Library: wxBase
Category: Text Conversion

See also
  wxMBConvUTF8, wxMBConvUTF32, wxMBConv Overview

## Additional Inherited Members
Public Member Functions inherited from wxMBConv
| wxMBConv ()
| Trivial default constructor.
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.
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.
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.
virtual bool | IsUTF8 () const
| Return true if the converter's charset is UTF-8.
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.
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.
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.
wxWCharBuffer | cMB2WC (const wxCharBuffer &buf) const
| Converts a char buffer to wide char one.
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.
wxCharBuffer | cWC2MB (const wxWCharBuffer &buf) const
| Converts a wide char buffer to char one.
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 char * | cMB2WX (const char *psz) const
| Converts from multibyte encoding to the current wxChar type (which depends on whether wxUSE_UNICODE is set to 1).
wxWCharBuffer | cMB2WX (const char *psz) const
| Converts from multibyte encoding to the current wxChar type (which depends on whether wxUSE_UNICODE is set to 1).
const wchar_t * | cWC2WX (const wchar_t *psz) const
| Converts from Unicode to the current wxChar type.
wxCharBuffer | cWC2WX (const wchar_t *psz) const
| Converts from Unicode to the current wxChar type.
const char * | cWX2MB (const wxChar *psz) const
| Converts from the current wxChar type to multibyte encoding.
wxCharBuffer | cWX2MB (const wxChar *psz) const
| Converts from the current wxChar type to multibyte encoding.
const wchar_t * | cWX2WC (const wxChar *psz) const
| Converts from the current wxChar type to Unicode.
wxWCharBuffer | cWX2WC (const wxChar *psz) const
| Converts from the current wxChar type to Unicode.
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.