Q:

How to use Emacs Gnus on HTML mails containing UTF-8 characters with Lynx as HTML renderer corectly?

I use GNU Emacs 24.2.1 (but on never Emacs it does not working too) with Gnus v5.13 and have configured it as follows to use Lynx to format the HTML mails:
(setq 'mm-text-html-renderer 'lynx)
(setcdr (assoc 'lynx mm-text-html-renderer-alist)
        '(mm-inline-render-with-stdin
          nil "lynx" "-dump" "-force_html" "-stdin" "-display_charset=UTF-8"))

But UTF-8 characters are not displayed correctly, for example i see something like that:
Es gibt \303\274ber 700 neue Top-Level-Domains.

It can easy be solved with this commands:
(toggle-read-only)
(recode-region (point-min) (point-max) 'utf-8 'utf-8)

But is it possible to get Gnus to interpret the Lynx output generally as UTF-8?
(This question was also asked without answers here:
http://lists.gnu.org/archive/html/info-gnus-english/2010-06/msg00006.html)

A:

I have found an answer by my self, here full code to activate Lynx in Gnus with UTF-8:
(require 'mm-view)
(setq mm-text-html-renderer 'lynx)
(setcdr (assoc 'lynx mm-text-html-renderer-alist)
        '(mm-inline-render-with-stdin
          nil "lynx" "-dump" "-force_html" "-stdin" "-display_charset=UTF-8"))

(defvar mm-insert-inline-use-utf-8 nil)

(defadvice mm-insert-inline (around mm-insert-inline-utf-8)
  (let ((x (point)))
    (prog1 (progn ad-do-it)
      (when mm-insert-inline-use-utf-8
        (decode-coding-region x (point-max) 'utf-8)))))
(ad-activate 'mm-insert-inline)

(defadvice mm-inline-text-html (around mm-inline-text-html-utf-8)
  (let ((mm-insert-inline-use-utf-8 t))
    ad-do-it))
(ad-activate 'mm-inline-text-html)

