bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iconv test on AIX 7.1BETA


From: Bruno Haible
Subject: iconv test on AIX 7.1BETA
Date: Sat, 31 Jul 2010 00:53:13 +0200
User-agent: KMail/1.9.9

Hello Rainer,

The logs say:

  test-iconv.c:81: assertion failed
  FAIL: test-iconv

Can you please compile and run the following program, and show the output?

===============================================================================
#include <iconv.h>
#include <errno.h>
#include <stdio.h>

int main ()
{
  iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
  if (cd_88591_to_utf8 == (iconv_t)(-1)) return 1;
  {
    static const char input[] = "\304";
    static char buf[2] = { (char)0xDE, (char)0xAD };
    const char *inptr = input;
    size_t inbytesleft = 1;
    char *outptr = buf;
    size_t outbytesleft = 1;
    size_t res = iconv (cd_88591_to_utf8,
                        (char **) &inptr, &inbytesleft,
                        &outptr, &outbytesleft);
    if (res == (size_t)(-1))
      {
        int err = errno;
        fprintf (stderr, "errno = %d\n", err);
        errno = err;
        perror ("");
      }
    else
      {
        printf ("res = %lu\n", (unsigned long) res);
      }
    return 0;
  }
}
===============================================================================



reply via email to

[Prev in Thread] Current Thread [Next in Thread]