From 5854fb5730482af8fb33e449621f5241bd1a7d74 Mon Sep 17 00:00:00 2001 From: tomo Date: Sat, 13 Nov 1999 13:23:34 +0000 Subject: [PATCH] (Fset_charset_mapping_table): Fix problem with `ascii'. --- src/mule-charset.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mule-charset.c b/src/mule-charset.c index ec831f3..fe66cef 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -2159,7 +2159,16 @@ Set mapping-table of CHARSET to TABLE. } else if (VECTORP (table)) { - if (XVECTOR_LENGTH (table) > CHARSET_CHARS (cs)) + int ccs_len; + + /* ad-hoc method for `ascii' */ + if ((CHARSET_CHARS (cs) == 94) && + (CHARSET_BYTE_OFFSET (cs) != 33)) + ccs_len = 128 - CHARSET_BYTE_OFFSET (cs); + else + ccs_len = CHARSET_CHARS (cs); + + if (XVECTOR_LENGTH (table) > ccs_len) args_out_of_range (table, make_int (CHARSET_CHARS (cs))); old_table = CHARSET_DECODING_TABLE(cs); CHARSET_DECODING_TABLE(cs) = table; -- 1.7.10.4