Changes committed gnus/lisp (ChangeLog mml.el)

"Katsumi Yamaoka" <[email protected]> Tue, 16 Dec 2008 00:35:32 +0100
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog mml.el

(mml-generate-mime-1): Prefer the MIME charset that Emacs knows since
 the charset specified might be a bogus alias that mm-charset-synonym-alist
 provides.


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1943 gnus/lisp/ChangeLog:7.1944
--- ChangeLog:7.1943	Mon Dec 15 20:44:47 2008
+++ ChangeLog	Tue Dec 16 00:35:32 2008
@@ -1,3 +1,9 @@
+2008-12-15  Katsumi Yamaoka  <[email protected]>
+
+	* mml.el (mml-generate-mime-1): Prefer the MIME charset that Emacs
+	knows since the charset specified might be a bogus alias that
+	mm-charset-synonym-alist provides.
+
 2008-12-15  Reiner Steib  <[email protected]>
 
 	* mm-util.el (mm-charset-synonym-alist): Add bogus names "UTF8" and
Index: mml.el
diff -u gnus/lisp/mml.el:7.70 gnus/lisp/mml.el:7.71
--- mml.el:7.70	Fri Oct  3 06:21:54 2008
+++ mml.el	Tue Dec 16 00:35:32 2008
@@ -482,7 +482,12 @@
 		 (setq charset nil
 		       coding nil))
 		(charset
-		 (setq charset (intern (downcase charset)))))
+		 ;; The value of `charset' might be a bogus alias that
+		 ;; `mm-charset-synonym-alist' provides, like `utf8',
+		 ;; so we prefer the MIME charset that Emacs knows for
+		 ;; the coding system `coding'.
+		 (setq charset (or (mm-coding-system-to-mime-charset coding)
+				   (intern (downcase charset))))))
 	  (if (and (not raw)
 		   (member (car (split-string type "/")) '("text" "message")))
 	      (progn