+2005-10-17 Ross Burton <ross@burtonini.com>
+
+ * configure.in:
+ Change UTF-8 check from ISO-2022-JP to ISO-8859-1 (#317451).
+
2005-10-14 Ross Burton <ross@burtonini.com>
* configure.in: Remove unused dependencies from the pkg-config
int main (int argc, char **argv)
{
- const char *jp = "\x1B\x24\x42\x46\x7C\x4B\x5C\x38\x6C";
- const char *utf8 = "\xE6\x97\xA5\xE6\x9C\xAC\xE8\xAA\x9E";
- char *transbuf = malloc (10), *trans = transbuf;
+ const char *from = "Some Text \xA4";
+ const char *utf8 = "Some Text \xC2\xA4";
+ char *transbuf = malloc (20), *trans = transbuf;
iconv_t cd;
- size_t jp_len = strlen (jp), utf8_len = 10;
+ size_t from_len = strlen (from), utf8_len = 20;
size_t utf8_real_len = strlen (utf8);
#ifdef HAVE_GNU_GET_LIBC_VERSION
exit (1);
#endif
- cd = iconv_open ("UTF-8", "ISO-2022-JP");
+ cd = iconv_open ("UTF-8", "ISO_8859-1");
if (cd == (iconv_t) -1)
exit (1);
- if (iconv (cd, &jp, &jp_len, &trans, &utf8_len) == -1 || jp_len != 0)
+ if (iconv (cd, &from, &from_len, &trans, &utf8_len) == -1 || from_len != 0)
exit (1);
if (memcmp (utf8, transbuf, utf8_real_len) != 0)
exit (1);