Version: 2.9.4
Public Member Functions
wxCSConv Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/strconv.h>

Inheritance diagram for wxCSConv:

Detailed Description

このクラスはシステムでサポートされている任意の文字コードと 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.

Library:  wxBase
Category:  Text Conversion
参照:
wxMBConv, wxEncodingConverter, wxMBConv Overview

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.

List of all members.


Constructor & Destructor Documentation

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.

Parameters:
charsetThe 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.

Parameters:
encodingAny valid (i.e. not wxFONTENCODING_MAX) font encoding.

Member Function Documentation

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.

Since:
2.8.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines