diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2013-01-13 03:16:59 +0000 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2013-01-13 03:16:59 +0000 |
commit | 77274a0af7489e7c61f2676861fa0681c9f61d8f (patch) | |
tree | 506c25735d28d70764af325c65ac37485504ec2c | |
parent | 9c8a4ff7e117ba052b2957c7e3f2e8751e8f8970 (diff) | |
download | iconv-77274a0af7489e7c61f2676861fa0681c9f61d8f.tar.gz iconv-77274a0af7489e7c61f2676861fa0681c9f61d8f.tar.bz2 |
U+FEFF no longer generates EINVAL.
A bare BOM is now considered a successful conversion.
See d18d556 for why we expected EINVAL at all.
-rw-r--r-- | test/GNU/table-to.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |