(mm-mule-charset-to-mime-charset): Use
authorJesper Harder <harder@ifa.au.dk>
Mon, 10 Feb 2003 00:42:17 +0000 (00:42 +0000)
committerJesper Harder <harder@ifa.au.dk>
Mon, 10 Feb 2003 00:42:17 +0000 (00:42 +0000)
sort-coding-systems to prefer utf-8 over utf-16.

lisp/ChangeLog
lisp/mm-util.el

index 8316c38..e5e5974 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-10  Jesper Harder  <harder@ifa.au.dk>
+
+       * mm-util.el (mm-mule-charset-to-mime-charset): Use
+       sort-coding-systems to prefer utf-8 over utf-16.
+
 2002-02-09  Kevin Greiner  <kgreiner@xpediantsolutions.com>
 
        * gnus-agent.el (gnus-agent-expire-days):
index 8a204c7..bfc3906 100644 (file)
@@ -300,7 +300,9 @@ mail with multiple parts is preferred to sending a Unicode one.")
   "Return the MIME charset corresponding to the given Mule CHARSET."
   (if (fboundp 'find-coding-systems-for-charsets)
       (let (mime)
-       (dolist (cs (find-coding-systems-for-charsets (list charset)))
+       (dolist (cs (sort-coding-systems
+                    (copy-sequence
+                     (find-coding-systems-for-charsets (list charset)))))
          (unless mime
            (when cs
              (setq mime (coding-system-get cs 'mime-charset)))))