]> wimlib.net Git - wimlib/commitdiff
Fix detection of non UTF-8 locales
authorEric Biggers <ebiggers3@gmail.com>
Sun, 6 Mar 2016 23:17:46 +0000 (17:17 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 6 Mar 2016 23:22:09 +0000 (17:22 -0600)
NEWS
src/wim.c

diff --git a/NEWS b/NEWS
index ac759ff3d81015e1e52b54c3b6154254946d9105..f7ed755f4b44b224947bb75066d26b9d0fabb7c2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ Version 1.9.1-BETA:
        Made some minor build-related updates.  Notably, enabled "silent" make
        rules; this makes the output cleaner when building from source.
 
+       Non UTF-8 locales are now detected correctly.
+
        Some Windows-specific updates:
                Fixed a bug where duplicate backslashes could be generated in
                link targets when extracting symbolic links and junctions.
index 79a9ba729e08d48b270b7dd538f946b092ee5cf5..f6d1f3a500374dae8479b5aea672723045932b17 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -944,10 +944,10 @@ test_locale_ctype_utf8(void)
 #else
        char *ctype = nl_langinfo(CODESET);
 
-       return (!strstr(ctype, "UTF-8") ||
-               !strstr(ctype, "UTF8") ||
-               !strstr(ctype, "utf8") ||
-               !strstr(ctype, "utf-8"));
+       return (strstr(ctype, "UTF-8") ||
+               strstr(ctype, "UTF8") ||
+               strstr(ctype, "utf8") ||
+               strstr(ctype, "utf-8"));
 #endif
 }