diff --git a/docs/latex/wx/encconv.tex b/docs/latex/wx/encconv.tex index 45e630294b..2bc0632ad1 100644 --- a/docs/latex/wx/encconv.tex +++ b/docs/latex/wx/encconv.tex @@ -68,6 +68,8 @@ or output encoding is not supported.) \func{void}{Convert}{\param{wxChar* }{str}} +\func{void}{Convert}{\param{const char* }{input}, \param{wxChar* }{output}} + Convert input string according to settings passed to \helpref{Init}{wxencodingconverterinit}. Note that you must call Init before using Convert! @@ -75,7 +77,7 @@ Note that you must call Init before using Convert! \membersection{wxEncodingConverter::GetPlatformEquivalents}\label{wxencodingconvertergetplatformequivalents} -\func{wxFontEncodingArray}{GetPlatformEquivalents}{\param{wxFontEncoding }{enc}, \param{int }{platform = wxPLATFORM\_CURRENT}} +\func{static wxFontEncodingArray}{GetPlatformEquivalents}{\param{wxFontEncoding }{enc}, \param{int }{platform = wxPLATFORM\_CURRENT}} Return equivalents for given font that are used under given platform. Supported platforms: @@ -121,15 +123,22 @@ encoding is native for this platform or not.) \item helpref{Convert}{wxencodingconverterconvert} is not limited to converting between equivalent encodings, it can convert between arbitrary two encodings! + +\item If {\it enc} is present in returned array, then it is {\bf always} first +item of it. + +\item Please not that returned array may not contain any item at all! \end{itemize} \membersection{wxEncodingConverter::GetAllEquivalents}\label{wxencodingconvertergetallequivalents} -\func{wxFontEncodingArray}{GetAllEquivalents}{\param{wxFontEncoding }{enc}} +\func{static wxFontEncodingArray}{GetAllEquivalents}{\param{wxFontEncoding }{enc}} Similar to \helpref{GetPlatformEquivalents}{wxencodingconvertergetplatformequivalents}, but this one will return ALL equivalent encodings, regardless the platform, and including itself. +This platform's encodings are before others in the array. And again, if {\it enc} is in the array, +it is the very first item in it. diff --git a/include/wx/encconv.h b/include/wx/encconv.h index 1610dd06b4..05dbfeaf40 100644 --- a/include/wx/encconv.h +++ b/include/wx/encconv.h @@ -82,10 +82,16 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject // Convert input string according to settings passed to Init. // Note that you must call Init before using Convert! - wxString Convert(const wxString& input); void Convert(const wxChar* input, wxChar* output); void Convert(wxChar* str) { Convert(str, str); } - + wxString Convert(const wxString& input); + +#if wxUSE_UNICODE // otherwise wxChar === char + void Convert(const char* input, wxChar* output); + void Convert(const wxChar* input, char* output); + void Convert(const char* input, char* output); + void Convert(char* str) { Convert(str, str); } +#endif // Return equivalent(s) for given font that are used // under given platform. wxPLATFORM_CURRENT means the plaform // this binary was compiled for @@ -124,7 +130,7 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject private: wxChar *m_Table; - bool m_UnicodeInput; + bool m_UnicodeInput, m_UnicodeOutput; bool m_JustCopy; };