Commit 177cd3b9 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

(rmail-convert-to-babyl-format): Don't remove ^M

characters left after base64 decoding.
(rmail-decode-region): Use -dos variety of `coding', to remove any
^M characters left after qp or base64 decoding.
parent 98a51048
2004-04-19 Eli Zaretskii <eliz@gnu.org>
* mail/rmail.el (rmail-convert-to-babyl-format): Don't remove ^M
characters left after base64 decoding.
(rmail-decode-region): Use -dos variety of `coding', to remove any
^M characters left after qp or base64 decoding.
2004-04-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* x-dnd.el (x-dnd-open-local-file, x-dnd-open-file): Improved error
......
......@@ -1666,7 +1666,15 @@ It returns t if it got any new messages."
(defun rmail-decode-region (from to coding)
(if (or (not coding) (not (coding-system-p coding)))
(setq coding 'undecided))
(decode-coding-region from to coding))
;; Use -dos decoding, to remove ^M characters left from base64 or
;; rogue qp-encoded text.
(decode-coding-region from to
(coding-system-change-eol-conversion coding 1))
;; Don't reveal the fact we used -dos decoding, as users generally
;; will not expect the RMAIL buffer to use DOS EOL format.
(setq buffer-file-coding-system
(setq last-coding-system-used
(coding-system-change-eol-conversion coding 0))))
;; the rmail-break-forwarded-messages feature is not implemented
(defun rmail-convert-to-babyl-format ()
......@@ -1751,9 +1759,6 @@ It returns t if it got any new messages."
(error nil))
;; Change "base64" to "8bit", to reflect the
;; decoding we just did.
(goto-char (1+ header-end))
(while (search-forward "\r\n" (point-max) t)
(replace-match "\n"))
(goto-char base64-header-field-end)
(delete-region (point) (search-backward ":"))
(insert ": 8bit"))))
......@@ -1901,9 +1906,6 @@ It returns t if it got any new messages."
(point)))
t)
(error nil))
(goto-char header-end)
(while (search-forward "\r\n" (point-max) t)
(replace-match "\n"))
;; Change "base64" to "8bit", to reflect the
;; decoding we just did.
(goto-char base64-header-field-end)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment