| 1 | % |
| 2 | % automatically generated by HelpGen from |
| 3 | % ../include/wx/strconv.h at 25/Mar/00 10:20:56 |
| 4 | % |
| 5 | |
| 6 | \section{\class{wxCSConv}}\label{wxcsconv} |
| 7 | |
| 8 | This class converts between any character sets and Unicode. |
| 9 | It has one predefined instance, {\bf wxConvLocal}, for the |
| 10 | default user character set. |
| 11 | |
| 12 | \wxheading{Derived from} |
| 13 | |
| 14 | \helpref{wxMBConv}{wxmbconv} |
| 15 | |
| 16 | \wxheading{Include files} |
| 17 | |
| 18 | <wx/strconv.h> |
| 19 | |
| 20 | \wxheading{Library} |
| 21 | |
| 22 | \helpref{wxBase}{librarieslist} |
| 23 | |
| 24 | \wxheading{See also} |
| 25 | |
| 26 | \helpref{wxMBConv}{wxmbconv}, |
| 27 | \helpref{wxEncodingConverter}{wxencodingconverter}, |
| 28 | \helpref{wxMBConv classes overview}{mbconvclasses} |
| 29 | |
| 30 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 31 | |
| 32 | \membersection{wxCSConv::wxCSConv}\label{wxcsconvwxcsconv} |
| 33 | |
| 34 | \func{}{wxCSConv}{\param{const wxChar* }{charset}} |
| 35 | |
| 36 | \func{}{wxCSConv}{\param{wxFontEncoding }{encoding}} |
| 37 | |
| 38 | Constructor. You may specify either the name of the character set you want to |
| 39 | convert from/to or an encoding constant. If the character set name (or the |
| 40 | encoding) is not recognized, ISO 8859-1 is used as fall back. |
| 41 | |
| 42 | |
| 43 | \membersection{wxCSConv::\destruct{wxCSConv}}\label{wxcsconvdtor} |
| 44 | |
| 45 | \func{}{\destruct{wxCSConv}}{\void} |
| 46 | |
| 47 | Destructor frees any resources needed to perform the conversion. |
| 48 | |
| 49 | |
| 50 | \membersection{wxCSConv::IsOk}\label{wxcsconvisok} |
| 51 | |
| 52 | \constfunc{bool}{IsOk}{\void} |
| 53 | |
| 54 | Returns \true if the charset (or the encoding) given at constructor is really |
| 55 | available to use. Returns \false if ISO 8859-1 will be used instead. |
| 56 | |
| 57 | Note this does \emph{not} mean that a given string will be correctly converted. |
| 58 | A malformed string may still make conversion functions return \texttt{wxCONV\_FAILED}. |
| 59 | |
| 60 | \newsince{2.8.2} |
| 61 | |
| 62 | |
| 63 | \membersection{wxCSConv::MB2WC}\label{wxcsconvmb2wc} |
| 64 | |
| 65 | \constfunc{size\_t}{MB2WC}{\param{wchar\_t* }{buf}, \param{const char* }{psz}, \param{size\_t }{n}} |
| 66 | |
| 67 | Converts from the selected character set to Unicode. Returns length of string written to destination buffer. |
| 68 | |
| 69 | |
| 70 | \membersection{wxCSConv::WC2MB}\label{wxcsconvwc2mb} |
| 71 | |
| 72 | \constfunc{size\_t}{WC2MB}{\param{char* }{buf}, \param{const wchar\_t* }{psz}, \param{size\_t }{n}} |
| 73 | |
| 74 | Converts from Unicode to the selected character set. Returns length of string written to destination buffer. |
| 75 | |