#include </home/zeitlin/src/wx/github/interface/wx/strconv.h>
このクラスはシステムでサポートされている任意の文字コードと Unicode とを相互変換します。
Please notice that this class uses system-provided conversion functions, e.g. MultiByteToWideChar()
and WideCharToMultiByte()
under MSW and iconv(3)
under Unix systems and as such may support different encodings and different encoding names on different platforms (although all relatively common encodings are supported should be supported everywhere).
It has one predefined instance, wxConvLocal, for the default user character set.
Public Member Functions | |
wxCSConv (const wxString &charset) | |
Constructor. | |
wxCSConv (wxFontEncoding encoding) | |
Constructor. | |
bool | IsOk () const |
Returns true if the charset (or the encoding) given at constructor is really available to use. |
wxCSConv::wxCSConv | ( | const wxString & | charset | ) |
Constructor.
You can specify the name of the character set you want to convert from/to. If the character set name is not recognized, ISO 8859-1 is used as fall back, use IsOk() to test for this.
charset | The name of the encoding, shouldn't be empty. |
wxCSConv::wxCSConv | ( | wxFontEncoding | encoding | ) |
Constructor.
You can specify an encoding constant for the character set you want to convert from/to. Use IsOk() after construction to check whether the encoding is supported by the current system.
encoding | Any valid (i.e. not wxFONTENCODING_MAX) font encoding. |
bool wxCSConv::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
.