From 9f3a3a08f06a226c50cb714f169aaae50c63e575 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 6 Mar 2016 17:17:46 -0600 Subject: [PATCH] Fix detection of non UTF-8 locales --- NEWS | 2 ++ src/wim.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) 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 } -- 2.43.0