Use `mm-with-part' so that the CTE is decoded before we feed it to w3m
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 29 Aug 2010 14:47:25 +0000 (16:47 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 29 Aug 2010 14:47:25 +0000 (16:47 +0200)
lisp/gnus-html.el

index fd1aaf7..f09d4e3 100644 (file)
     (save-restriction
       (narrow-to-region (point) (point))
       (save-excursion
-       (set-buffer (car handle))
-       (let* ((coding-system-for-read 'utf-8)
-              (coding-system-for-write 'utf-8)
-              (default-process-coding-system
-                (cons coding-system-for-read coding-system-for-write)))
-         (call-process-region (point-min) (point-max)
-                              "w3m" 
-                              nil article-buffer nil
-                              "-halfdump"
-                              "-O" "UTF-8"
-                              "-o" "ext_halfdump=1"
-                              "-t" (format "%s" tab-width)
-                              "-cols" (format "%s" gnus-html-frame-width)
-                              "-o" "display_image=off"
-                              "-T" "text/html")))
+       (mm-with-part handle
+         (let* ((coding-system-for-read 'utf-8)
+                (coding-system-for-write 'utf-8)
+                (default-process-coding-system
+                  (cons coding-system-for-read coding-system-for-write)))
+           (call-process-region (point-min) (point-max)
+                                "w3m" 
+                                nil article-buffer nil
+                                "-halfdump"
+                                "-O" "UTF-8"
+                                "-o" "ext_halfdump=1"
+                                "-t" (format "%s" tab-width)
+                                "-cols" (format "%s" gnus-html-frame-width)
+                                "-o" "display_image=off"
+                                "-T" "text/html"))))
       (gnus-html-wash-tags))))
 
 (defun gnus-html-wash-tags ()