diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-18 22:34:59 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-18 22:34:59 +0000 |
commit | 444aba803d58c7e96ab505a1e11647309cc84e65 (patch) | |
tree | 36e8a7e5ff8699d1ecaf83e2058e19b6d18135fd /src | |
parent | d18d556e0bfc48b3fcac5b5fe8cd537234e77708 (diff) | |
download | iconv-444aba803d58c7e96ab505a1e11647309cc84e65.tar.gz iconv-444aba803d58c7e96ab505a1e11647309cc84e65.tar.bz2 |
Treat U+FFFF as invalid. Otherwise, we end up writing the first mapped out character encountered in the target encoding.
svn path=/trunk/iconv/; revision=5716
Diffstat (limited to 'src')
-rw-r--r-- | src/iconv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iconv.c b/src/iconv.c index 817822c..800ece2 100644 --- a/src/iconv.c +++ b/src/iconv.c @@ -418,7 +418,7 @@ int character_callback(void *handle, UCS4 c) /* Stop on invalid characters if we're not transliterating */ /** \todo is this sane? -- we can't distinguish between illegal input * or valid input which just happens to correspond with U+fffd. */ - if (c == 0xFFFD && !e->transliterate) { + if ((c == 0xFFFD || c == 0xFFFF) && !e->transliterate) { e->write_state = WRITE_FAILED; return 1; } |