[gnus git] branch master updated: m0-7-259-g40693dd =1= Allow overriding charset in some decoding functions
Katsumi Yamaoka <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 40693dd8f66e58915722fa0034b59889cfe51c19 (commit)
from fc259d69c6dc58c870d0165e53bbd3d306b67fb3 (commit)
- Log -----------------------------------------------------------------
commit 40693dd8f66e58915722fa0034b59889cfe51c19
Author: Katsumi Yamaoka <[email protected]>
Date: Wed Nov 27 06:39:16 2013 +0000
Allow overriding charset in some decoding functions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ed12191..fc3a58f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,13 @@
2013-11-27 Katsumi Yamaoka <[email protected]>
+ * gnus-art.el (article-de-quoted-unreadable)
+ (article-de-base64-unreadable, gnus-mime-copy-part)
+ * gnus-html.el (gnus-article-html)
+ * mm-view.el (mm-inline-text-html-render-with-w3)
+ (mm-inline-text-html-render-with-w3m-standalone)
+ * rfc2231.el (rfc2231-decode-encoded-string):
+ Allow overriding charset by mm-charset-override-alist.
+
* gnus-art.el (gnus-article-browse-html-parts):
Replace LWSPs with ` 's in header.
diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el
index 7161b9a..2b14714 100644
--- a/lisp/gnus-art.el
+++ b/lisp/gnus-art.el
@@ -2666,7 +2666,7 @@ If READ-CHARSET, ask for a coding system."
(string-match "quoted-printable" type))))
(article-goto-body)
(quoted-printable-decode-region
- (point) (point-max) (mm-charset-to-coding-system charset))))))
+ (point) (point-max) (mm-charset-to-coding-system charset nil t))))))
(defun article-de-base64-unreadable (&optional force read-charset)
"Translate a base64 article.
@@ -2697,7 +2697,8 @@ If READ-CHARSET, ask for a coding system."
(narrow-to-region (point) (point-max))
(base64-decode-region (point-min) (point-max))
(mm-decode-coding-region
- (point-min) (point-max) (mm-charset-to-coding-system charset)))))))
+ (point-min) (point-max)
+ (mm-charset-to-coding-system charset nil t)))))))
(eval-when-compile
(require 'rfc1843))
@@ -5248,7 +5249,8 @@ are decompressed."
(switch-to-buffer (generate-new-buffer filename))
(if (or coding-system
(and charset
- (setq coding-system (mm-charset-to-coding-system charset))
+ (setq coding-system (mm-charset-to-coding-system
+ charset nil t))
(not (eq coding-system 'ascii))))
(progn
(mm-enable-multibyte)
diff --git a/lisp/gnus-html.el b/lisp/gnus-html.el
index 2700af3..36c1677 100644
--- a/lisp/gnus-html.el
+++ b/lisp/gnus-html.el
@@ -143,7 +143,8 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
(charset (mail-content-type-get (mm-handle-type handle)
'charset)))
(when (and charset
- (setq charset (mm-charset-to-coding-system charset))
+ (setq charset (mm-charset-to-coding-system
+ charset nil t))
(not (eq charset 'ascii)))
(insert (prog1
(mm-decode-coding-string (buffer-string) charset)
diff --git a/lisp/mm-view.el b/lisp/mm-view.el
index 9512a41..48124f1 100644
--- a/lisp/mm-view.el
+++ b/lisp/mm-view.el
@@ -175,7 +175,7 @@
(match-end 2))))
(if (fboundp 'w3-coding-system-for-mime-charset)
(w3-coding-system-for-mime-charset bsubstr)
- (mm-charset-to-coding-system bsubstr))))
+ (mm-charset-to-coding-system bsubstr nil t))))
(delete-region (point-min) (point-max))
(insert (mm-decode-string text charset))))
(save-window-excursion
@@ -343,9 +343,10 @@
'charset)
(symbol-name mail-parse-charset)))
cs)
- (unless (and charset
- (setq cs (mm-charset-to-coding-system charset))
+ (if (and charset
+ (setq cs (mm-charset-to-coding-system charset nil t))
(not (eq cs 'ascii)))
+ (setq charset (format "%s" (mm-coding-system-to-mime-charset cs)))
;; The default.
(setq charset "iso-8859-1"
cs 'iso-8859-1))
diff --git a/lisp/rfc2231.el b/lisp/rfc2231.el
index e8d7075..4baacde 100644
--- a/lisp/rfc2231.el
+++ b/lisp/rfc2231.el
@@ -215,7 +215,8 @@ These look like:
\"''This%20is%20%2A%2A%2Afun%2A%2A%2A\", or
\"This is ***fun***\"."
(string-match "\\`\\(?:\\([^']+\\)?'\\([^']+\\)?'\\)?\\(.+\\)" string)
- (let ((coding-system (mm-charset-to-coding-system (match-string 1 string)))
+ (let ((coding-system (mm-charset-to-coding-system
+ (match-string 1 string) nil t))
;;(language (match-string 2 string))
(value (match-string 3 string)))
(mm-with-unibyte-buffer
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 8 ++++++++
lisp/gnus-art.el | 8 +++++---
lisp/gnus-html.el | 3 ++-
lisp/mm-view.el | 9 +++++----
lisp/rfc2231.el | 3 ++-
5 files changed, 22 insertions(+), 9 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project