Support musl libc
All checks were successful
Alpine 3.20 Success
Arch Linux AUR Success
OpenBSD 7.5 Success

This commit is contained in:
2024-09-11 04:55:48 +02:00
parent ac1a21eac8
commit b87fbc93a6
3 changed files with 18 additions and 9 deletions

View File

@@ -4076,11 +4076,10 @@ main (int argc, char *argv[])
setlocale (LC_CTYPE, "");
char *encoding = nl_langinfo (CODESET);
#ifdef __linux__
// XXX: not quite sure if this is actually desirable
// TODO: instead retry with JSON_ENSURE_ASCII
encoding = xstrdup_printf ("%s//TRANSLIT", encoding);
#endif // __linux__
if (ICONV_ACCEPTS_TRANSLIT)
encoding = xstrdup_printf ("%s//TRANSLIT", encoding);
if ((g_ctx.term_from_utf8 = iconv_open (encoding, "UTF-8"))
== (iconv_t) -1