Mercurial > emacs
diff lisp/gnus/gnus-art.el @ 107581:1e23ce3cbd8b
2010-03-30 Martin Stjernholm <mast@lysator.liu.se>
* mm-decode.el (mm-add-meta-html-tag): Added option to override the
charset.
* gnus-art.el (gnus-article-browse-html-parts): Force the correct
charset into the <meta> tag when the article is encoded to utf-8.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Tue, 30 Mar 2010 04:44:38 +0000 |
parents | 3ca642fe505f |
children | 19e22195d54e |
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el Tue Mar 30 04:12:11 2010 +0000 +++ b/lisp/gnus/gnus-art.el Tue Mar 30 04:44:38 2010 +0000 @@ -2893,7 +2893,8 @@ ;; Add a meta html tag to specify charset and a header. (cond (header - (let (title eheader body hcharset coding cid-image-dir) + (let (title eheader body hcharset coding force-charset + cid-image-dir) (with-temp-buffer (mm-enable-multibyte) (setq case-fold-search t) @@ -2917,7 +2918,8 @@ title (when title (mm-encode-coding-string title charset)) body (mm-encode-coding-string (mm-get-part handle) - charset)) + charset) + force-charset t) (setq hcharset (mm-find-mime-charset-region (point-min) (point-max))) (cond ((= (length hcharset) 1) @@ -2948,7 +2950,8 @@ body (mm-encode-coding-string (mm-decode-coding-string (mm-get-part handle) body) - charset)))) + charset) + force-charset t))) (setq charset hcharset eheader (mm-encode-coding-string (buffer-string) coding) @@ -2962,7 +2965,7 @@ (mm-disable-multibyte) (insert body) (when charset - (mm-add-meta-html-tag handle charset)) + (mm-add-meta-html-tag handle charset force-charset)) (when title (goto-char (point-min)) (unless (search-forward "<title>" nil t)