From: Katsumi Yamaoka Date: Wed, 1 Sep 2010 06:04:49 +0000 (+0000) Subject: gnus-article-html: Decode contents by charset. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~48^2~163 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da43765da1e8cadedcbb447422ced1840a2ef618;p=emacs.git gnus-article-html: Decode contents by charset. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index af7fa8460dd..16c90ac61e8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2010-09-01 Katsumi Yamaoka + + * gnus-html.el (gnus-article-html): Decode contents by charset. + 2010-09-01 Katsumi Yamaoka * gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size) diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el index 0c3ad4b045c..8a7fae1fe9a 100644 --- a/lisp/gnus/gnus-html.el +++ b/lisp/gnus/gnus-html.el @@ -66,7 +66,13 @@ (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))) + (cons coding-system-for-read coding-system-for-write)) + (charset (mail-content-type-get (mm-handle-type handle) + 'charset))) + (when (and charset + (setq charset (mm-charset-to-coding-system charset)) + (not (eq charset 'ascii))) + (mm-decode-coding-region (point-min) (point-max) charset)) (call-process-region (point-min) (point-max) "w3m" nil article-buffer nil