+2003-12-28 Jesper Harder <harder@ifa.au.dk>
+
+ * mml1991.el (mml1991-pgg-encrypt): Decode according to CTE before
+ encrypting.
+
+2003-12-28 Jesper Harder <harder@ifa.au.dk>
+
+ * mml1991.el (mml1991-pgg-sign): Use unibyte when re-encoding.
+ From Ivan Boldyrev <boldyrev@uiggm.nsc.ru> (tiny change).
+
+
2003-12-26 Katsumi Yamaoka <yamaoka@jpl.org>
* dgnushack.el: Add an advice to byte-optimize-form-code-walker to
(pop-to-buffer pgg-errors-buffer)
(error "Encrypt error"))
(delete-region (point-min) (point-max))
- (insert-buffer-substring pgg-output-buffer)
- (goto-char (point-min))
- (while (re-search-forward "\r+$" nil t)
- (replace-match "" t t))
- (mm-encode-content-transfer-encoding cte)
- (goto-char (point-min))
- (when headers
- (insert headers))
- (insert "\n")
+ (mm-with-unibyte-current-buffer
+ (insert-buffer-substring pgg-output-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward "\r+$" nil t)
+ (replace-match "" t t))
+ (mm-encode-content-transfer-encoding cte)
+ (goto-char (point-min))
+ (when headers
+ (insert headers))
+ (insert "\n"))
t))
(defun mml1991-pgg-encrypt (cont &optional sign)
- (let (headers)
+ (let (cte)
;; Strip MIME Content[^ ]: headers since it will be ASCII ARMOURED
(goto-char (point-min))
- (while (looking-at "^Content[^ ]+:") (forward-line))
+ (while (looking-at "^Content[^ ]+:")
+ (when (looking-at "^Content-Transfer-Encoding: \\(.+\\)")
+ (setq cte (intern (match-string 1))))
+ (forward-line))
(unless (bobp)
(delete-region (point-min) (point)))
+ (mm-decode-content-transfer-encoding cte)
(unless (pgg-encrypt-region
(point-min) (point-max)
(split-string