OK, fixing wxEncodingConverter was a little bit harder than I expected
because of some dodgy overloading implementation in here, but this ought to do it, I think... (or is it hope?) I wonder if my tree still keeps on having unicode enabled even when I reconfigure with --disable-unicode, and that's why I didn't detect the wxEncodingConverter problem myself? Wonder if that is still the case? git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -52,7 +52,7 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
|
||||
~wxEncodingConverter() { if (m_Table) delete[] m_Table; }
|
||||
|
||||
// Initialize convertion. Both output or input encoding may
|
||||
// be wxFONTENCODING_UNICODE, but only if wxUSE_UNICODE is set to 1.
|
||||
// be wxFONTENCODING_UNICODE, but only if wxUSE_WCHAR_T is set to 1.
|
||||
//
|
||||
// All subsequent calls to Convert() will interpret it's argument
|
||||
// as a string in input_enc encoding and will output string in
|
||||
@@ -82,15 +82,15 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
|
||||
|
||||
// Convert input string according to settings passed to Init.
|
||||
// Note that you must call Init before using Convert!
|
||||
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); }
|
||||
wxString Convert(const wxString& input);
|
||||
|
||||
#if wxUSE_WCHAR_T
|
||||
void Convert(const char* input, wchar_t* output);
|
||||
void Convert(const wchar_t* input, char* output);
|
||||
void Convert(const wchar_t* input, wchar_t* output);
|
||||
void Convert(wchar_t* str) { Convert(str, str); }
|
||||
#endif
|
||||
// Return equivalent(s) for given font that are used
|
||||
// under given platform. wxPLATFORM_CURRENT means the plaform
|
||||
@@ -129,7 +129,11 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
|
||||
|
||||
private:
|
||||
|
||||
wxChar *m_Table;
|
||||
#if wxUSE_WCHAR_T
|
||||
wchar_t *m_Table;
|
||||
#else
|
||||
char *m_Table;
|
||||
#endif
|
||||
bool m_UnicodeInput, m_UnicodeOutput;
|
||||
bool m_JustCopy;
|
||||
|
||||
@@ -137,20 +141,3 @@ class WXDLLEXPORT wxEncodingConverter : public wxObject
|
||||
|
||||
|
||||
#endif // __ENCCONV_H__
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user