(mime-edit-normalize-body): Don't use the `(replace-match "\\1\r\n")' form
[elisp/semi.git] / mime-edit.el
index 466effd..18263bf 100644 (file)
@@ -498,6 +498,8 @@ If encoding is nil, it is determined from its contents."
     (iso-8859-7                8 "quoted-printable")
     (iso-8859-8                8 "quoted-printable")
     (iso-8859-9                8 "quoted-printable")
+    (iso-8859-14       8 "quoted-printable")
+    (iso-8859-15       8 "quoted-printable")
     (iso-2022-jp       7 "base64")
     (iso-2022-jp-3     7 "base64")
     (iso-2022-kr       7 "base64")
@@ -2300,7 +2302,12 @@ Content-Description: S/MIME Encrypted Message][base64]]\n")
                    (narrow-to-region beg (mime-edit-content-end))
                    (goto-char beg)
                    (while (re-search-forward "\\(\\=\\|[^\r]\\)\n" nil t)
-                     (replace-match "\\1\r\n"))))
+                     ;; Don't use this in the multibyte buffer since it may
+                     ;; convert the unibyte string into multibyte.
+                     ;;;;(replace-match "\\1\r\n"))))
+                     (backward-char 1)
+                     (insert "\r")
+                     (forward-char 1))))
              (goto-char beg)
              (mime-encode-region beg (mime-edit-content-end)
                                  (or encoding "7bit"))