From b87fbc93a64d9b5dd219396fc5c98e8779c55810 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Wed, 11 Sep 2024 04:55:48 +0200 Subject: Support musl libc --- json-rpc-shell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'json-rpc-shell.c') diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 86e291d..a80be5d 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -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 -- cgit v1.2.3-70-g09d2