From 905ca9d2127e4f00ee2f936c22f98474a140000d Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 3 Dec 2008 06:35:02 +0000 Subject: [PATCH] (encode_coding_emacs_mule): Be sure to set `code'. --- src/coding.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/coding.c b/src/coding.c index 8890eb188ce..ff0e5b0643e 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2449,8 +2449,10 @@ encode_coding_emacs_mule (coding) if (preferred_charset_id >= 0) { charset = CHARSET_FROM_ID (preferred_charset_id); - if (! CHAR_CHARSET_P (c, charset)) - charset = char_charset (c, charset_list, NULL); + if (CHAR_CHARSET_P (c, charset)) + code = ENCODE_CHAR (charset, c); + else + charset = char_charset (c, charset_list, &code); } else charset = char_charset (c, charset_list, &code); -- 2.39.2