Commit 0b575a33 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

lisp/gnus/gnus-art.el (gnus-article-browse-html-*): Work for broken Chinese articles

parent 48a2a0b4
2013-11-27 Katsumi Yamaoka <yamaoka@jpl.org>
Work for broken Chinese articles.
* gnus-art.el (gnus-article-browse-html-save-cid-content):
Exclude broken handles that gnus-summary-enter-digest-group may create.
(gnus-article-browse-html-parts):
Allow overriding charset by mm-charset-override-alist.
2013-11-21 Jan Tatarik <jan.tatarik@gmail.com>
 
* gnus-icalendar.el (gnus-icalendar-additional-identities): New.
......
......@@ -2794,6 +2794,9 @@ Return file name."
(dolist (handle handles)
(cond
((not (listp handle)))
;; Exclude broken handles that `gnus-summary-enter-digest-group'
;; may create.
((not (or (bufferp (car handle)) (stringp (car handle)))))
((equal (mm-handle-media-supertype handle) "multipart")
(when (setq file (gnus-article-browse-html-save-cid-content
cid handle directory))
......@@ -2801,11 +2804,12 @@ Return file name."
((equal (concat "<" cid ">") (mm-handle-id handle))
(setq file
(expand-file-name
(or (mm-handle-filename handle)
(concat
(make-temp-name "cid")
(car (rassoc (car (mm-handle-type handle)) mailcap-mime-extensions))))
directory))
(or (mm-handle-filename handle)
(concat
(make-temp-name "cid")
(car (rassoc (car (mm-handle-type handle))
mailcap-mime-extensions))))
directory))
(mm-save-part-to-file handle file)
(throw 'found file))))))))
......@@ -2908,7 +2912,7 @@ message header will be added to the bodies of the \"text/html\" parts."
(cond ((= (length hcharset) 1)
(setq hcharset (car hcharset)
coding (mm-charset-to-coding-system
hcharset)))
hcharset nil t)))
((> (length hcharset) 1)
(setq hcharset 'utf-8
coding hcharset)))
......@@ -2916,7 +2920,8 @@ message header will be added to the bodies of the \"text/html\" parts."
(if charset
(progn
(setq body
(mm-charset-to-coding-system charset))
(mm-charset-to-coding-system charset
nil t))
(if (eq coding body)
(setq eheader (mm-encode-coding-string
(buffer-string) coding)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment