From: Kenichi Handa Date: Fri, 31 May 2002 01:03:50 +0000 (+0000) Subject: (encode_coding_emacs_mule): Pay attention to raw-8-bit chars. X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~712 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=16eafb5da6c22f0f20d2a22475e11749c79f3a42;p=emacs.git (encode_coding_emacs_mule): Pay attention to raw-8-bit chars. (encode_coding_iso_2022): Likewise. (encode_coding_sjis): Likewise. (encode_coding_big5): Likewise. (encode_coding_charset): Likewise. --- diff --git a/src/coding.c b/src/coding.c index 7cc5f6bbd9c..abc11ea5eb7 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1999,6 +1999,11 @@ encode_coding_emacs_mule (coding) c = *charbuf++; if (ASCII_CHAR_P (c)) EMIT_ONE_ASCII_BYTE (c); + else if (CHAR_BYTE8_P (c)) + { + c = CHAR_TO_BYTE8 (c); + EMIT_ONE_BYTE (c); + } else { struct charset *charset; @@ -3555,6 +3560,11 @@ encode_coding_iso_2022 (coding) ENCODE_ISO_CHARACTER (charset, c); } } + else if (CHAR_BYTE8_P (c)) + { + c = CHAR_TO_BYTE8 (c); + EMIT_ONE_BYTE (c); + } else { struct charset *charset = char_charset (c, charset_list, NULL); @@ -3925,6 +3935,11 @@ encode_coding_sjis (coding) /* Now encode the character C. */ if (ASCII_CHAR_P (c) && ascii_compatible) EMIT_ONE_ASCII_BYTE (c); + else if (CHAR_BYTE8_P (c)) + { + c = CHAR_TO_BYTE8 (c); + EMIT_ONE_BYTE (c); + } else { unsigned code; @@ -3993,6 +4008,11 @@ encode_coding_big5 (coding) /* Now encode the character C. */ if (ASCII_CHAR_P (c) && ascii_compatible) EMIT_ONE_ASCII_BYTE (c); + else if (CHAR_BYTE8_P (c)) + { + c = CHAR_TO_BYTE8 (c); + EMIT_ONE_BYTE (c); + } else { unsigned code; @@ -4475,6 +4495,11 @@ encode_coding_charset (coding) c = *charbuf++; if (ascii_compatible && ASCII_CHAR_P (c)) EMIT_ONE_ASCII_BYTE (c); + else if (CHAR_BYTE8_P (c)) + { + c = CHAR_TO_BYTE8 (c); + EMIT_ONE_BYTE (c); + } else { charset = char_charset (c, charset_list, &code);