Synch to No Gnus 200603020708.
authoryamaoka <yamaoka>
Thu, 2 Mar 2006 07:08:48 +0000 (07:08 +0000)
committeryamaoka <yamaoka>
Thu, 2 Mar 2006 07:08:48 +0000 (07:08 +0000)
lisp/ChangeLog
lisp/mml.el

index 112cfc9..20fc4ef 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-02  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * mml.el (mml-generate-mime-1): Encode parts other than text/* or
+       message/* containing non-ASCII text properly.
+
 2006-03-01  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el: Require gmm-utils, remove autoloads.
index 5f310e5..57ec619 100644 (file)
@@ -518,7 +518,15 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
                                 (mm-find-buffer-file-coding-system
                                  filename)))))
               (t
-               (insert (cdr (assq 'contents cont)))))
+               (let ((contents (cdr (assq 'contents cont))))
+                 (if (if (featurep 'xemacs)
+                         (string-match "[^\000-\377]" contents)
+                       (mm-multibyte-string-p contents))
+                     (progn
+                       (mm-enable-multibyte)
+                       (insert contents)
+                       (setq charset (mm-encode-body charset)))
+                   (insert contents)))))
              (setq encoding (mm-encode-buffer type)
                    coded (mm-string-as-multibyte (buffer-string))))
            (mml-insert-mime-headers cont type charset encoding nil)