From d18d556e0bfc48b3fcac5b5fe8cd537234e77708 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 18 Nov 2008 22:34:08 +0000 Subject: 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 --- test/GNU/table-to.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3