]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
intlconv: add more string for the translit runtime check, fixes #4956
authorJaroslav Kysela <perex@perex.cz>
Tue, 20 Feb 2018 08:17:43 +0000 (09:17 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 20 Feb 2018 08:17:43 +0000 (09:17 +0100)
src/intlconv.c
src/main.c

index fb0d176c0b064b01eaeedd1a166c64de2183bf27..a646db88e95ba6ab906fb0e86bf7d17a65302e01 100644 (file)
@@ -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();
   }
index 50991d018dd196aca1b5cd7a70b4efb2957fac73..01b27e92a27fb6066f4a235d74acf2901077e8ed 100644 (file)
@@ -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();