Importing Pterodactyl Gnus v0.52.
[elisp/gnus.git-] / lisp / rfc2047.el
index ea36d60..d3eb033 100644 (file)
@@ -27,8 +27,8 @@
 (eval-and-compile
   (eval
    '(unless (fboundp 'base64-decode-string)
-      (autoload 'base64-decode-string "base64")
-      (autoload 'base64-encode-region "base64" nil t))))
+      (require 'base64))))
+
 (require 'qp)
 (require 'mm-util)
 (require 'ietf-drums)
@@ -129,7 +129,10 @@ Should be called narrowed to the head of the message."
                  (rfc2047-encode-region (point-min) (point-max)))
                 ;; Hm.
                 (t))))
-           (goto-char (point-max))))))))
+           (goto-char (point-max)))))
+      (when rfc2047-default-charset
+       (encode-coding-region (point-min) (point-max)
+                             rfc2047-default-charset)))))
 
 (defun rfc2047-encodable-p ()
   "Say whether the current (narrowed) buffer contains characters that need encoding."