diff options
Diffstat (limited to 'iconvdata/8bit-generic.c')
-rw-r--r-- | iconvdata/8bit-generic.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/iconvdata/8bit-generic.c b/iconvdata/8bit-generic.c index 3543bdf004..3b6b47abb1 100644 --- a/iconvdata/8bit-generic.c +++ b/iconvdata/8bit-generic.c @@ -37,8 +37,13 @@ if (HAS_HOLES && ch == L'\0' && *inptr != '\0') \ { \ /* This is an illegal character. */ \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ + if (! ignore_errors_p ()) \ + { \ + result = __GCONV_ILLEGAL_INPUT; \ + break; \ + } \ + \ + ++*converted; \ } \ \ put32 (outptr, ch); \ @@ -60,11 +65,17 @@ || (ch != 0 && from_ucs4[ch] == '\0')) \ { \ /* This is an illegal character. */ \ - result = __GCONV_ILLEGAL_INPUT; \ - break; \ + if (! ignore_errors_p ()) \ + { \ + result = __GCONV_ILLEGAL_INPUT; \ + break; \ + } \ + \ + ++*converted; \ } \ + else \ + *outptr++ = from_ucs4[ch]; \ \ - *outptr++ = from_ucs4[ch]; \ inptr += 4; \ } #include <iconv/loop.c> |