From ae6449a411b458edb4ac720e4cc8273e0bcee19b Mon Sep 17 00:00:00 2001 From: tomo Date: Thu, 19 Sep 2002 01:13:22 +0000 Subject: [PATCH] (decode_coding_utf8): Check CCS is specified or not. --- src/text-coding.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/text-coding.c b/src/text-coding.c index 8f4595b..151e878 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -4351,10 +4351,17 @@ decode_coding_utf8 (Lstream *decoding, const Extbyte *src, cpos = ( cpos << 6 ) | ( c & 0x3f ); if (counter == 1) { - Emchar char_id = decode_defined_char (ccs, cpos); + Emchar char_id; - if (char_id < 0) - char_id = cpos; + if (!NILP (ccs)) + { + char_id = decode_defined_char (ccs, cpos); + + if (char_id < 0) + char_id = cpos; + } + else + ccs = char_id; COMPOSE_ADD_CHAR (str, char_id, dst); cpos = 0; counter = 0; -- 1.7.10.4