From 77274a0af7489e7c61f2676861fa0681c9f61d8f Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 13 Jan 2013 03:16:59 +0000 Subject: U+FEFF no longer generates EINVAL. A bare BOM is now considered a successful conversion. See d18d556 for why we expected EINVAL at all. --- test/GNU/table-to.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/GNU/table-to.c b/test/GNU/table-to.c index e8d11ad..62c30a8 100644 --- a/test/GNU/table-to.c +++ b/test/GNU/table-to.c @@ -96,12 +96,14 @@ int main (int argc, char* argv[]) size_t outbytesleft = sizeof(buf); size_t result; size_t result2 = 0; + if (in == 0xfeff) + continue; iconv(cd,NULL,NULL,NULL,NULL); result = iconv(cd,(char**)&inbuf,&inbytesleft,&outbuf,&outbytesleft); if (result != (size_t)(-1)) result2 = iconv(cd,NULL,NULL,&outbuf,&outbytesleft); if (result == (size_t)(-1) || result2 == (size_t)(-1)) { - if (errno != EILSEQ && !(errno == EINVAL && in == 0xfeff)) { + if (errno != EILSEQ) { int saved_errno = errno; fprintf(stderr,"0x%02X: iconv error: ",i); errno = saved_errno; -- cgit v1.2.3