From 5798a1ea950f1e16dd069cdcf34a9c2c00e6298f Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 20 Feb 2018 09:17:43 +0100 Subject: [PATCH] intlconv: add more string for the translit runtime check, fixes #4956 --- src/intlconv.c | 7 +++++-- src/main.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/intlconv.c b/src/intlconv.c index fb0d176c0..a646db88e 100644 --- a/src/intlconv.c +++ b/src/intlconv.c @@ -29,8 +29,11 @@ intlconv_test( void ) /* The string is "Yellow Horse" in Czech for the curiosity */ const char *charset = intlconv_charset_id("ASCII", 1, 1); char *s = intlconv_utf8safestr(charset, "ŽluťoučkýKůň", 128); - if (strcmp(s, "ZlutouckyKun")) { - tvherror(LS_MAIN, "iconv() routine is not working properly, aborting!"); + if (s == NULL || + (strcmp(s, "ZlutouckyKun") && + strcmp(s, "Zlutouck'yKun") && + strcmp(s, "?lu?ou?k?K??"))) { + tvherror(LS_MAIN, "iconv() routine is not working properly (%s), aborting!", s); tvh_safe_usleep(2000000); abort(); } diff --git a/src/main.c b/src/main.c index 50991d018..01b27e92a 100644 --- a/src/main.c +++ b/src/main.c @@ -921,7 +921,7 @@ main(int argc, char **argv) tvheadend_cwd = dirname(tvh_strdupa(tvheadend_cwd0)); /* Set locale */ - setlocale(LC_ALL, "C.utf8"); + setlocale(LC_ALL, ""); setlocale(LC_NUMERIC, "C"); tvh_gettext_init(); -- 2.47.3