Change UTF-8 check from ISO-2022-JP to ISO-8859-1 (#317451)
authorRoss Burton <rburton@src.gnome.org>
Mon, 17 Oct 2005 08:24:15 +0000 (08:24 +0000)
committerRoss Burton <rburton@src.gnome.org>
Mon, 17 Oct 2005 08:24:15 +0000 (08:24 +0000)
ChangeLog
configure.in

index 59d1287..d5ef211 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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
index ff09790..28fc198 100644 (file)
@@ -223,11 +223,11 @@ if test $have_iconv = yes; then
 
 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
@@ -236,10 +236,10 @@ int main (int argc, char **argv)
                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);