Make mm-shr use mail-parse-charset by default
* lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default. This helps an html message with no charset spec to be decoded.
This commit is contained in:
parent
90f76eb358
commit
41de25c113
1 changed files with 10 additions and 9 deletions
|
@ -1793,22 +1793,23 @@ If RECURSIVE, search recursively."
|
|||
(buffer-string))))))
|
||||
(shr-inhibit-images mm-html-inhibit-images)
|
||||
(shr-blocked-images mm-html-blocked-images)
|
||||
charset char)
|
||||
charset coding char)
|
||||
(unless handle
|
||||
(setq handle (mm-dissect-buffer t)))
|
||||
(setq charset (mail-content-type-get (mm-handle-type handle) 'charset))
|
||||
(and (setq charset
|
||||
(or (mail-content-type-get (mm-handle-type handle) 'charset)
|
||||
mail-parse-charset))
|
||||
(setq coding (mm-charset-to-coding-system charset nil t))
|
||||
(eq coding 'ascii)
|
||||
(setq coding nil))
|
||||
(save-restriction
|
||||
(narrow-to-region (point) (point))
|
||||
(shr-insert-document
|
||||
(mm-with-part handle
|
||||
(insert (prog1
|
||||
(if (and charset
|
||||
(setq charset
|
||||
(mm-charset-to-coding-system charset
|
||||
nil t))
|
||||
(not (eq charset 'ascii)))
|
||||
(decode-coding-string (buffer-string) charset)
|
||||
(string-as-multibyte (buffer-string)))
|
||||
(if coding
|
||||
(decode-coding-string (buffer-string) coding)
|
||||
(buffer-string))
|
||||
(erase-buffer)
|
||||
(mm-enable-multibyte)))
|
||||
(goto-char (point-min))
|
||||
|
|
Loading…
Add table
Reference in a new issue