return iconv(cd, inbuf, inbytesleft, outbuf, outbytesleft);
}
+static void
+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!");
+ tvh_safe_usleep(2000000);
+ abort();
+ }
+ free(s);
+}
+
void
intlconv_init( void )
{
pthread_mutex_init(&intlconv_lock, NULL);
pthread_mutex_init(&intlconv_lock_src, NULL);
+ intlconv_test();
}
void