8 static const char testbuf
[] = {
9 0xEF, 0xBE, 0x9F, 0xD0, 0xB4, 0xEF, 0xBE, 0x9F, 0x29, 0xEF, 0xBE, 0x8E,
10 0xEF, 0xBE, 0x9F, 0xEF, 0xBD, 0xB6, 0xEF, 0xBD, 0xB0, 0xEF, 0xBE, 0x9D
16 setlocale (LC_ALL
, "de_DE.UTF-8");
17 iconv_t ic
= iconv_open ("ISO-2022-JP//TRANSLIT", "UTF-8");
18 if (ic
== (iconv_t
) -1)
20 puts ("iconv_open failed");
23 size_t outremain
= sizeof testbuf
;
24 char outbuf
[outremain
];
25 char *inp
= (char *) testbuf
;
27 size_t inremain
= sizeof testbuf
;
29 int ret
= iconv (ic
, &inp
, &inremain
, &outp
, &outremain
);
32 if (ret
== (size_t) -1)
35 puts ("buffer too small reported. OK");
38 printf ("iconv failed with %d (%m)\n", errno
);
44 printf ("iconv returned %d\n", ret
);
51 #define TEST_FUNCTION do_test ()
52 #include "../test-skeleton.c"