aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-11-18 21:13:57 +0000
committerKarl Heuer1997-11-18 21:13:57 +0000
commitae9f695f42e7a283b59f5c045425497b7e053316 (patch)
treea7157134d592393b183c6faed13107e5a8ed388e
parent6291b1f3f9c187834e867b770d31a73fac263346 (diff)
downloademacs-ae9f695f42e7a283b59f5c045425497b7e053316.tar.gz
emacs-ae9f695f42e7a283b59f5c045425497b7e053316.zip
(rmail-convert-to-babyl-format): If the
message uses the quoted-printable content-transfer-encoding, decode it into 8bit.
-rw-r--r--lisp/mail/rmail.el43
1 files changed, 31 insertions, 12 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 06bfa89e733..4bad2115fb3 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -1431,6 +1431,14 @@ Optional DEFAULT is password to start with."
1431 (and (re-search-forward "\n\n" nil t) 1431 (and (re-search-forward "\n\n" nil t)
1432 (1- (point))))) 1432 (1- (point)))))
1433 (case-fold-search t) 1433 (case-fold-search t)
1434 (quoted-printable-header-field-end
1435 (save-excursion
1436 ;; Back up to end of previous line, in case the
1437 ;; Content-Transfer-Encoding field comes first.
1438 (forward-char -1)
1439 (re-search-forward
1440 "\ncontent-transfer-encoding\\(\n?[\t ]\\)*:\\(\n?[\t ]\\)*quoted-printable\\(\n?[\t ]\\)*"
1441 header-end t)))
1434 (size 1442 (size
1435 ;; Get the numeric value from the Content-Length field. 1443 ;; Get the numeric value from the Content-Length field.
1436 (save-excursion 1444 (save-excursion
@@ -1460,18 +1468,29 @@ Optional DEFAULT is password to start with."
1460 (looking-at "From ")))) 1468 (looking-at "From "))))
1461 (goto-char (+ header-end size)) 1469 (goto-char (+ header-end size))
1462 (message "Ignoring invalid Content-Length field") 1470 (message "Ignoring invalid Content-Length field")
1463 (sit-for 1 0 t)))) 1471 (sit-for 1 0 t)))
1464 1472 (if (re-search-forward
1465 (if (re-search-forward 1473 (concat "^[\^_]?\\("
1466 (concat "^[\^_]?\\(" 1474 rmail-unix-mail-delimiter
1467 rmail-unix-mail-delimiter 1475 "\\|"
1468 "\\|" 1476 rmail-mmdf-delim1 "\\|"
1469 rmail-mmdf-delim1 "\\|" 1477 "^BABYL OPTIONS:\\|"
1470 "^BABYL OPTIONS:\\|" 1478 "\^L\n[01],\\)") nil t)
1471 "\^L\n[01],\\)") nil t) 1479 (goto-char (match-beginning 1))
1472 (goto-char (match-beginning 1)) 1480 (goto-char (point-max)))
1473 (goto-char (point-max))) 1481 (setq count (1+ count))
1474 (setq count (1+ count)) 1482 (if quoted-printable-header-field-end
1483 (save-excursion
1484 (save-restriction
1485 (narrow-to-region header-end (point))
1486 (require 'gnus-art)
1487 (article-mime-decode-quoted-printable-buffer))
1488 ;; Change "quoted-printable" to "8bit",
1489 ;; to reflect the decoding we just did.
1490 (goto-char quoted-printable-header-field-end)
1491 (zap-to-char -1 ?:)
1492 (insert ": 8bit"))))
1493
1475 (save-excursion 1494 (save-excursion
1476 (save-restriction 1495 (save-restriction
1477 (narrow-to-region start (point)) 1496 (narrow-to-region start (point))