iconv_t cd_88592_to_utf8 = iconv_open ("UTF-8", "ISO-8859-2");
iconv_t cd_utf8_to_88592 = iconv_open ("ISO-8859-2", "UTF-8");
- ASSERT (cd_88591_to_88592 != (iconv_t)(-1));
- ASSERT (cd_88592_to_88591 != (iconv_t)(-1));
ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
ASSERT (cd_88592_to_utf8 != (iconv_t)(-1));
free (result);
}
- iconv_close (cd_88591_to_88592);
- iconv_close (cd_88592_to_88591);
+ if (cd_88591_to_88592 != (iconv_t)(-1))
+ iconv_close (cd_88591_to_88592);
+ if (cd_88592_to_88591 != (iconv_t)(-1))
+ iconv_close (cd_88592_to_88591);
iconv_close (cd_88591_to_utf8);
iconv_close (cd_utf8_to_88591);
iconv_close (cd_88592_to_utf8);
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
free (result);
}
}
+# endif
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 || _LIBICONV_VERSION >= 0x0105
/* Test conversion from UTF-8 to ISO-8859-1 with transliteration. */
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
free (result);
}
}
+# endif
#endif
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
ASSERT (u16_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
free (result);
}
}
+# endif
#endif
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-16. */
for (h = 0; h < SIZEOF (handlers); h++)
{
ASSERT (u32_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif
}
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
free (result);
}
}
+# endif
#endif
free (result);
}
+ /* autodetect_jp is only supported when iconv() support ISO-2022-JP-2. */
+# if defined _LIBICONV_VERSION || !(defined _AIX || defined __sgi || defined __hpux || defined __osf__)
/* Test conversions from autodetect_jp to UTF-8. */
for (h = 0; h < SIZEOF (handlers); h++)
{
ASSERT (u8_strcmp (result, expected) == 0);
free (result);
}
+# endif
#endif