Synch to No Gnus 200406292138.
[elisp/gnus.git-] / lisp / rfc2047.el
index adbbd4e..3b76718 100644 (file)
@@ -427,18 +427,18 @@ Dynamically bind `rfc2047-encoding-type' to change that."
                      (progn
                        (rfc2047-encode start end)
                        (setq last-encoded t))
-                   (setq last-encoded nil))
-                 )))
+                   (setq last-encoded nil)))))
            (error
             (error "Invalid data for rfc2047 encoding: %s"
                    (mm-replace-in-string orig-text "[ \t\n]+" " ")))))))
-    (rfc2047-fold-region b (point))))
+    (rfc2047-fold-region b (point))
+    (goto-char (point-max))))
 
 (defun rfc2047-encode-string (string)
   "Encode words in STRING.
 By default, the string is treated as containing addresses (see
 `rfc2047-encoding-type')."
-  (with-temp-buffer
+  (mm-with-multibyte-buffer
     (insert string)
     (rfc2047-encode-region (point-min) (point-max))
     (buffer-string)))