summaryrefslogtreecommitdiff
path: root/legacy/man-db/man-db-2.8.5-iconv.patch
blob: c2232920dd8423dc5bfeb01af5f2e49a6ec98149 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--- man-db-2.8.5/src/man.c	2018-06-18 22:44:35.672743065 -0500
+++ man-db-2.8.5/src/man.c	2018-06-18 22:46:35.032624890 -0500
@@ -1516,15 +1516,13 @@
 {
 	debug ("add_output_iconv: source %s, target %s\n", source, target);
 	if (source && target && !STREQ (source, target)) {
-		char *target_translit = xasprintf ("%s//TRANSLIT", target);
 		pipecmd *iconv_cmd;
 		iconv_cmd = pipecmd_new_args
-			("iconv", "-c", "-f", source, "-t", target_translit,
+			("iconv", "-c", "-f", source, "-t", target,
 			 (void *) 0);
 		pipecmd_pre_exec (iconv_cmd, sandbox_load, sandbox_free,
 				  sandbox);
 		pipeline_command (p, iconv_cmd);
-		free (target_translit);
 	}
 }
 
--- man-db-2.8.5/src/manconv.c
+++ man-db-2.8.5/src/manconv.c
@@ -111,6 +111,5 @@ static int try_iconv (pipeline *p, const char *try_from_code, const char *to,
 	iconv_t cd_utf8, cd = NULL;
-	bool to_utf8 = STREQ (try_to_code, "UTF-8") ||
-		       STRNEQ (try_to_code, "UTF-8//", 7);
-	const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
-	bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
+	bool to_utf8 = STREQ (try_to_code, "UTF-8");
+	const char *utf8_target = "UTF-8";
+	bool ignore_errors = 0;
 	int ret = 0;
--- man-db-2.8.5/src/manconv_client.c
+++ man-db-2.8.5/src/manconv_client.c
@@ -102,7 +102,7 @@ void add_manconv (pipeline *p, const char *source, const char *target)
 		codes->from[2] = NULL;
 		name = appendstr (name, "UTF-8:", source, (void *) 0);
 	}
-	codes->to = xasprintf ("%s//IGNORE", target);
+	codes->to = xstrdup (target);
 	/* informational only; no shell quoting concerns */
 	name = appendstr (name, " -t ", codes->to, (void *) 0);
 	if (quiet >= 2)
--- man-db-2.8.5/src/manconv_main.c
+++ man-db-2.8.5/src/manconv_main.c
@@ -106,9 +106,6 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state)
 			return 0;
 		case 't':
 			to_code = xstrdup (arg);
-			if (!strstr (to_code, "//"))
-				to_code = appendstr (to_code, "//TRANSLIT",
-						     (void *) 0);
 			return 0;
 		case 'd':
 			debug_level = 1;
--- man-db-2.8.5/src/whatis.c
+++ man-db-2.8.5/src/whatis.c
@@ -945,7 +945,7 @@ int main (int argc, char *argv[])
 	display_seen = hashtable_create (&null_hashtable_free);
 
 #ifdef HAVE_ICONV
-	locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ());
+	locale_charset = xstrdup (get_locale_charset ());
 	conv_to_locale = iconv_open (locale_charset, "UTF-8");
 	free (locale_charset);
 #endif /* HAVE_ICONV */