Sync with r21-2-19-utf-2000-0_13-0.
[chise/xemacs-chise.git] / src / text-coding.c
index 9a96f3e..5d77048 100644 (file)
@@ -4921,6 +4921,11 @@ char_encode_iso2022 (struct encoding_stream *str, Emchar ch,
                               Vdefault_coded_charset_priority_list));
            }
          BREAKUP_CHAR (ch, charset, byte1, byte2);
+         if (!XCHARSET_FINAL (charset))
+           {
+             charset = Vcharset_ascii;
+             byte1 = '~';
+           }
        found:
          Vdefault_coded_charset_priority_list
            = original_default_coded_charset_priority_list;