From 16eafb5da6c22f0f20d2a22475e11749c79f3a42 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 31 May 2002 01:03:50 +0000 Subject: [PATCH] (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. --- src/coding.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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); -- 2.39.5