10 char in
[] = "\x83\xd9";
19 inbytesleft
= sizeof(in
) - 1;
21 outbytesleft
= sizeof(out
);
23 cd
= iconv_open("utf-8", "cp932");
24 ret
= iconv(cd
, &inbuf
, &inbytesleft
, &outbuf
, &outbytesleft
);
27 printf("result: %zd %d %zd %d\n", ret
, errno
, inbytesleft
, inbuf
[0]);
30 * result: -1 84 0 0 (84=EILSEQ)
32 * Error is returnd but inbuf is consumed.
34 * \x83\xd9 is valid shift-jis sequence but no character is assigned
38 return (ret
!= -1 || errno
!= EILSEQ
39 || inbytesleft
!= 2 || inbuf
[0] != in
[0]);
42 #define TEST_FUNCTION do_test ()
43 #include "../test-skeleton.c"