]> wimlib.net Git - wimlib/blobdiff - src/wim.c
Improve char encoding support (IN PROGRESS)
[wimlib] / src / wim.c
index 60b2b57e8908ca50d9927508a840b40f4982820a..6df2c71e79bdb9b39e349141be1f752d6c0b6029 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -27,6 +27,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <langinfo.h>
 #include <limits.h>
 #include <stdarg.h>
 #include <stdlib.h>
@@ -645,11 +646,16 @@ WIMLIBAPI void wimlib_free(WIMStruct *w)
        DEBUG("Freed WIMStruct");
 }
 
+bool wimlib_mbs_is_utf8;
+
 /* Get global memory allocations out of the way.  Not strictly necessary in
  * single-threaded programs like 'imagex'. */
 WIMLIBAPI int wimlib_global_init()
 {
+       char *encoding;
+
        libxml_global_init();
+       wimlib_mbs_is_utf8 = (strcmp(nl_langinfo(CODESET), "UTF-8") == 0);
        return iconv_global_init();
 }