summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-18 22:34:08 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-18 22:34:08 +0000
commitd18d556e0bfc48b3fcac5b5fe8cd537234e77708 (patch)
treec747d30f87461d6aad86fb4c0ff9fe0ecde5ee09
parentc3c5b3a6eb6c7bbb07fad25605937591fe877cc4 (diff)
downloadiconv-d18d556e0bfc48b3fcac5b5fe8cd537234e77708.tar.gz
iconv-d18d556e0bfc48b3fcac5b5fe8cd537234e77708.tar.bz2
Don't bail when U+FEFF results in EINVAL.
UnicodeLib eats this at the start of input, assuming it's a BOM. There's nothing we can do to avoid this, so work around it here. In practice, this shouldn't be a problem -- noone's going to sanely want to convert a string containing a BOM and nothing else. svn path=/trunk/iconv/; revision=5715
-rw-r--r--test/GNU/table-to.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/GNU/table-to.c b/test/GNU/table-to.c
index 6d493ed..0722774 100644
--- a/test/GNU/table-to.c
+++ b/test/GNU/table-to.c
@@ -101,7 +101,7 @@ int main (int argc, char* argv[])
if (result != (size_t)(-1))
result2 = iconv(cd,NULL,NULL,&outbuf,&outbytesleft);
if (result == (size_t)(-1) || result2 == (size_t)(-1)) {
- if (errno != EILSEQ) {
+ if (errno != EILSEQ && !(errno == EINVAL && in == 0xfeff)) {
int saved_errno = errno;
fprintf(stderr,"0x%02X: iconv error: ",i);
errno = saved_errno;