aports/community/man-db/ignore.patch
psykose 36b3ef6950 community/man-db: remove //IGNORE suffix
fixes
 Executing man-db-2.11.2-r0.trigger
 mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-1"): Invalid argument
 mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-1"): Invalid argument
 mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-1"): Invalid argument
2023-04-21 16:16:23 +02:00

33 lines
1.1 KiB
Diff

musl doesn't support //ignore:
mandb: iconv_open ("UTF-8//IGNORE", "ISO-8859-1"): Invalid argument
so just remove it
--
diff --git a/src/convert.c b/src/convert.c
index 447240c..4f4d006 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -56,7 +56,7 @@ char * ATTRIBUTE_MALLOC convert_to_locale (char *string)
{
if (!conv_to_locale_initialized) {
char *locale_charset = xasprintf
- ("%s//IGNORE", get_locale_charset ());
+ ("%s", get_locale_charset ());
conv_to_locale = iconv_open (locale_charset, "UTF-8");
free (locale_charset);
if (conv_to_locale != (iconv_t) -1)
diff --git a/src/manconv.c b/src/manconv.c
index e775b1b..41a11bd 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -301,7 +301,7 @@ static tried_iconv try_iconv (decompress *decomp, const char *try_from_code,
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";
+ const char *utf8_target = "UTF-8";
bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
tried_iconv ret = TRIED_ICONV_OK;