From: Eric Biggers Date: Sun, 6 Mar 2016 23:17:46 +0000 (-0600) Subject: Fix detection of non UTF-8 locales X-Git-Tag: v1.9.1~3 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=9f3a3a08f06a226c50cb714f169aaae50c63e575;ds=sidebyside Fix detection of non UTF-8 locales --- diff --git a/NEWS b/NEWS index ac759ff3..f7ed755f 100644 --- 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. diff --git a/src/wim.c b/src/wim.c index 79a9ba72..f6d1f3a5 100644 --- 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 }