1be407
diff -upr man-db-2.6.1.orig/lib/encodings.c man-db-2.6.1/lib/encodings.c
1be407
--- man-db-2.6.1.orig/lib/encodings.c	2011-05-31 02:03:02.000000000 +0200
1be407
+++ man-db-2.6.1/lib/encodings.c	2012-06-15 18:32:37.393496286 +0200
1be407
@@ -585,14 +585,23 @@ char *find_charset_locale (const char *c
1be407
 	if (STREQ (charset, get_locale_charset ()))
1be407
 		return NULL;
1be407
 
1be407
-	supported = fopen (supported_path, "r");
1be407
-	if (!supported)
1be407
-		return NULL;
1be407
-
1be407
 	saved_locale = setlocale (LC_CTYPE, NULL);
1be407
 	if (saved_locale)
1be407
 		saved_locale = xstrdup (saved_locale);
1be407
 
1be407
+	supported = fopen (supported_path, "r");
1be407
+	if (!supported) {
1be407
+		if (strlen (charset) >= (size_t) 5
1be407
+				&& strncmp (charset, "UTF-8", (size_t) 5) == 0) {
1be407
+			locale = xstrdup("en_US.UTF-8");
1be407
+			if (setlocale (LC_CTYPE, locale)) {
1be407
+				setlocale (LC_CTYPE, saved_locale);
1be407
+				return locale;
1be407
+			}
1be407
+		}
1be407
+		return NULL;
1be407
+	}
1be407
+
1be407
 	while (getline (&line, &n, supported) >= 0) {
1be407
 		const char *space = strchr (line, ' ');
1be407
 		if (space) {