From: tomo Date: Sat, 10 Aug 2002 10:58:17 +0000 (+0000) Subject: (decode_coding_big5): Support entity-reference decoding feature. X-Git-Tag: r21-2-44-utf-2000-0_19-nc4-b5-1-2~14 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=66683c49a1ff6aa6b2fc50ec816770d6634a7593;p=chise%2Fxemacs-chise.git (decode_coding_big5): Support entity-reference decoding feature. --- diff --git a/src/text-coding.c b/src/text-coding.c index 1d8d6f2..b9f3b20 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -3811,14 +3811,33 @@ decode_coding_big5 (Lstream *decoding, const Extbyte *src, { DECODE_HANDLE_EOL_TYPE (eol_type, c, flags, dst); if (BYTE_BIG5_TWO_BYTE_1_P (c)) - cpos = c; + { + decode_flush_er_chars (str, dst); + cpos = c; + } + else if ( c >= ' ' ) + { + /* DECODE_ADD_BINARY_CHAR (c, dst); */ + decode_add_er_char (str, c, dst); + } else - DECODE_ADD_BINARY_CHAR (c, dst); + { + decode_flush_er_chars (str, dst); + DECODE_HANDLE_EOL_TYPE (eol_type, c, flags, dst); + DECODE_ADD_BINARY_CHAR (c, dst); + } } label_continue_loop:; } - DECODE_HANDLE_END_OF_CONVERSION (flags, cpos, dst); + /* DECODE_HANDLE_END_OF_CONVERSION (flags, cpos, dst); */ + if (flags & CODING_STATE_END) + { + decode_flush_er_chars (str, dst); + DECODE_OUTPUT_PARTIAL_CHAR (cpos); + if (flags & CODING_STATE_CR) + Dynarr_add (dst, '\r'); + } str->flags = flags; str->cpos = cpos;