From: yamaoka Date: Tue, 16 Dec 2003 23:36:24 +0000 (+0000) Subject: (mime-edit-normalize-body): Don't use the `(replace-match "\\1\r\n")' form X-Git-Tag: emiko-1_14-epg-branchpoint~30 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=df441fe75c98587a9dbe98c9317d4130650e9113;p=elisp%2Fsemi.git (mime-edit-normalize-body): Don't use the `(replace-match "\\1\r\n")' form since it may convert the unibyte string into multibyte in Emacs 21.4. --- diff --git a/ChangeLog b/ChangeLog index e3a3869..292c3ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-12-16 Katsumi Yamaoka + + * mime-edit.el (mime-edit-normalize-body): Don't use the + `(replace-match "\\1\r\n")' form since it may convert the unibyte + string into multibyte in Emacs 21.4. + 2003-12-12 MORIOKA Tomohiko * mime-edit.el (mime-edit-user-agent-value): Add a setting for diff --git a/mime-edit.el b/mime-edit.el index 5f36513..9195374 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -2111,7 +2111,12 @@ Content-Transfer-Encoding: 7bit (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"))