chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/configuration.c, lib/home.c: Introduce environment variables.
[disorder]
/
lib
/
charset.c
diff --git
a/lib/charset.c
b/lib/charset.c
index feb4469e5950d0c7de9837ee3fa49d80e22ecff2..b8af6e68fdbf5b49edde7b018c1c085257937ad5 100644
(file)
--- a/
lib/charset.c
+++ b/
lib/charset.c
@@
-34,6
+34,17
@@
#include "vector.h"
#include "unicode.h"
#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
/** @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);
}
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
/** @brief Truncate a string for display purposes
* @param s Pointer to UTF-8 string
* @param max Maximum number of columns