Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/disorder
[disorder] / lib / charset.c
index feb4469..b8af6e6 100644 (file)
 #include "vector.h"
 #include "unicode.h"
 
+#if _WIN32
+// TODO WIN32 we assume UTF-8 here, which is *definitely wrong*
+char *mb2utf8(const char *mb) {
+  return xstrdup(mb);
+}
+
+char *utf82mb(const char *utf8) {
+  return xstrdup(utf8);
+}
+#else
+
 /** @brief Low-level converstion routine
  * @param from Source encoding
  * @param to Destination encoding
@@ -117,6 +128,8 @@ char *any2any(const char *from,
   else return xstrdup(any);
 }
 
+#endif
+
 /** @brief Truncate a string for display purposes
  * @param s Pointer to UTF-8 string
  * @param max Maximum number of columns