From: tomo Date: Sun, 10 Oct 1999 18:25:28 +0000 (+0000) Subject: (char_encode_iso2022): Ignore non-ISO-2022 coded-charsets in X-Git-Tag: r21-2-19-utf-2000-0_9-0~24 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c9523ecda2bbac84807cc0bf460540ad71bf8943;p=chise%2Fxemacs-chise.git.1 (char_encode_iso2022): Ignore non-ISO-2022 coded-charsets in `default-coded-charset-priority-list' when breaking up a character. --- diff --git a/src/text-coding.c b/src/text-coding.c index 05bf7d1..e3fe8ff 100644 --- a/src/text-coding.c +++ b/src/text-coding.c @@ -4805,7 +4805,24 @@ char_encode_iso2022 (struct encoding_stream *str, Emchar ch, } } if (reg == -1) - BREAKUP_CHAR (ch, charset, byte1, byte2); + { + Lisp_Object original_default_coded_charset_priority_list + = Vdefault_coded_charset_priority_list; + + while (!EQ (Vdefault_coded_charset_priority_list, Qnil)) + { + BREAKUP_CHAR (ch, charset, byte1, byte2); + if (XCHARSET_FINAL (charset)) + goto found; + Vdefault_coded_charset_priority_list + = Fcdr (Fmemq (XCHARSET_NAME (charset), + Vdefault_coded_charset_priority_list)); + } + BREAKUP_CHAR (ch, charset, byte1, byte2); + found: + Vdefault_coded_charset_priority_list + = original_default_coded_charset_priority_list; + } ensure_correct_direction (XCHARSET_DIRECTION (charset), codesys, dst, flags, 0);