Package: mhc
Version: 0.25.1+20050120-2.1
Severity: important
Tags: patch etch

On mhc with Gnus, displaying a subject (e.g. "ほげ(foo bar)")
causes an error "Invalid data for rfc2047 encoding".  Because
rfc2047-encode-string is misused with mhc-gnus/encode-string.

This bug affects to mhc 0.25.1+20050120-2.1 (etch) and is fixed in
0.25.1+20050120-3 (sid) with the follwing patch:

----
--- mhc-0.25.1+20050120-2.1/emacs/mhc-gnus.el
+++ mhc-0.25.1+20050120/emacs/mhc-gnus.el
@@ -343,7 +343,9 @@
        (put 'mhc-gnus 'eword-decode-string 'mhc-mime-eword-decode-string)
        (put 'mhc-gnus 'mime-get-raw-buffer 'mhc-gnus-mime-get-raw-buffer)
        (put 'mhc-gnus 'mime-get-mime-structure 
'mhc-gnus-mime-get-mime-structure))
-    (defalias 'mhc-gnus/encode-string 'rfc2047-encode-string)
+    (defun mhc-gnus/encode-string (string)
+      (let ((rfc2047-encoding-type 'mime))
+       (rfc2047-encode-string string)))
     (put 'mhc-gnus 'draft-setup-new 'mhc-gnus-draft-setup-new)
     (put 'mhc-gnus 'draft-reedit-buffer 'mhc-gnus-draft-reedit-buffer)
     (put 'mhc-gnus 'draft-reedit-file 'mhc-gnus-draft-reedit-file)
----

I hope this bug will be fixed in testing before etch is released.

Thanks,
-- 
Tatsuya Kinoshita

Attachment: pgpeoF87Olzu9.pgp
Description: PGP signature

Reply via email to