X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ftext-coding.c;h=e3fe8ffa888789ab4c6f4971aef45933ff82d926;hb=ea86268817c8bc22b1baf0284126a93ced503c7c;hp=05bf7d1009ce87acf0214ceefde18ff5432887c3;hpb=e8399be9819462e4a72526af6eaa9b4ec5d3127d;p=chise%2Fxemacs-chise.git- 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);