# HG changeset patch # User Kenichi Handa # Date 983847330 0 # Node ID 022c0e9f5e9b384cc88714a83436e8ad476e8abf # Parent 427c9eef0c0cda5939885fe5d3fe01c267433063 (ccl_driver) : Fix for the case that the source is unibyte. diff -r 427c9eef0c0c -r 022c0e9f5e9b src/ccl.c --- a/src/ccl.c Tue Mar 06 02:54:50 2001 +0000 +++ b/src/ccl.c Tue Mar 06 02:55:30 2001 +0000 @@ -1248,6 +1248,16 @@ goto ccl_read_multibyte_character_suspend; } + if (!ccl->multibyte) + { + int bytes; + if (!UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes)) + { + reg[RRR] = CHARSET_8_BIT_CONTROL; + reg[rrr] = *src++; + break; + } + } i = *src++; if (i == '\n' && ccl->eol_type != CODING_EOL_LF) { @@ -1335,6 +1345,12 @@ break; ccl_read_multibyte_character_suspend: + if (src <= src_end && !ccl->multibyte && ccl->last_block) + { + reg[RRR] = CHARSET_8_BIT_CONTROL; + reg[rrr] = i; + break; + } src--; if (ccl->last_block) {