[mew-int 2982] Re: encoding bug in summary

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
Tue Mar 22 22:24:46 JST 2011


Hello,

>> Please have a look at the forwarded spam mail and a partial snapshot
>> of my Emacs frame (compiled 2011-02-24 from bzr sources).  As you can
>> see, mew selects an incorrect encoding for displaying the body's
>> snippet within the summary, while the encoding is correct in the
>> message window itself.
> 
> I confirmed that this happens only on Emacs 24. 

This happens both on Emacs 23 and 24, not 22.

The following patch would avoid this problem. Please test.

--Kazu

diff --git a/mew-scan.el b/mew-scan.el
index 54c85d8..34f3d1f 100644
--- a/mew-scan.el
+++ b/mew-scan.el
@@ -579,6 +579,7 @@ Address is converted by 'mew-summary-form-extract-addr'. See also
 	  (setq textp t)
 	  (setq cs (mew-charset-to-cs charset))
 	  (if (null cs) (setq cs mew-cs-autoconv)))))) ;; end of 'break
+    (set-buffer-multibyte nil)
     (when (and textp (mew-coding-system-p cs))
       (setq i 0)
       (while (and (not (eobp)) (< i I) (< j J))
@@ -597,6 +598,7 @@ Address is converted by 'mew-summary-form-extract-addr'. See also
 	  (setq body (concat body (mew-buffer-substring beg (1- (point))) " "))
 	  (setq j (1+ j)))
 	(setq i (1+ i)))
+      (set-buffer-multibyte t)
       (setq body (mew-replace-white-space body))
       (setq body (condition-case nil
 		     (mew-cs-decode-string body cs)


More information about the Mew-int mailing list