WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_file)) wxConv_file;
WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_UTF7)) wxConv_UTF7;
WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_UTF8)) wxConv_UTF8;
-#ifdef __WXGTK__
-WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_gdk)) wxConv_gdk;
-#endif
+#if defined(__WXGTK__) && (GTK_MINOR_VERSION > 0)
+ WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_gdk)) wxConv_gdk;
+#endif // GTK > 1.0
class wxCharacterSet;
class WXDLLEXPORT wxCSConv : public wxMBConv
{
private:
- wxCharacterSet *cset;
+ wxChar *m_name;
+ wxCharacterSet *m_cset;
+ bool m_deferred;
public:
wxCSConv(const wxChar *charset);
- virtual ~wxCSConv(void);
+ virtual ~wxCSConv();
+ void LoadNow();
virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
};
// from C string (for compilers using unsigned char)
wxString(const unsigned char* psz, size_t nLength = wxSTRING_MAXLEN)
{ InitWith((const char*)psz, 0, nLength); }
+ // from multibyte string
+ wxString(const char *psz, wxMBConv& WXUNUSED(conv), size_t nLength = wxSTRING_MAXLEN)
+ { InitWith(psz, 0, nLength); }
// from wide (Unicode) string
wxString(const wchar_t *pwz);
// from wxCharBuffer
wxString WXDLLEXPORT operator+(wxChar ch, const wxString& string);
wxString WXDLLEXPORT operator+(const wxString& string, const wxChar *psz);
wxString WXDLLEXPORT operator+(const wxChar *psz, const wxString& string);
+#if wxUSE_UNICODE
+inline wxString WXDLLEXPORT operator+(const wxString& string, const wxWCharBuffer& buf)
+{ return string + (const wchar_t *)buf; }
+inline wxString WXDLLEXPORT operator+(const wxWCharBuffer& buf, const wxString& string)
+{ return (const wchar_t *)buf + string; }
+#else
+inline wxString WXDLLEXPORT operator+(const wxString& string, const wxCharBuffer& buf)
+{ return string + (const char *)buf; }
+inline wxString WXDLLEXPORT operator+(const wxCharBuffer& buf, const wxString& string)
+{ return (const char *)buf + string; }
+#endif
// ---------------------------------------------------------------------------
// Implementation only from here until the end of file