+// ----------------------------------------------------------------------------
+// standard gdk conversion
+// ----------------------------------------------------------------------------
+
+#ifdef __WXGTK__
+WXDLLEXPORT_DATA(wxMBConv_gdk) wxConv_gdk;
+
+#include <gdk/gdk.h>
+
+size_t wxMBConv_gdk::MB2WC(wchar_t *buf, const char *psz, size_t n) const
+{
+ if (buf) {
+ return gdk_mbstowcs((GdkWChar *)buf, psz, n);
+ } else {
+ GdkWChar *nbuf = new GdkWChar[n=strlen(psz)];
+ size_t len = gdk_mbstowcs(nbuf, psz, n);
+ delete [] nbuf;
+ return len;
+ }
+}
+
+size_t wxMBConv_gdk::WC2MB(char *buf, const wchar_t *psz, size_t n) const
+{
+ char *mbstr = gdk_wcstombs((GdkWChar *)psz);
+ size_t len = mbstr ? strlen(mbstr) : 0;
+ if (buf) {
+ if (len > n) len = n;
+ memcpy(buf, psz, len);
+ if (len < n) buf[len] = 0;
+ }
+ return len;
+}
+#endif
+
+// ----------------------------------------------------------------------------
+// UTF-7
+// ----------------------------------------------------------------------------
+
+WXDLLEXPORT_DATA(wxMBConv_UTF7) wxConv_UTF7;