diff options
| -rw-r--r-- | lisp/gnus/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/gnus/mm-uu.el | 17 | ||||
| -rw-r--r-- | lisp/gnus/mml2015.el | 2 |
3 files changed, 22 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c547166bfa7..fc1c8881b82 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,11 @@ +2006-04-28 Katsumi Yamaoka <yamaoka@jpl.org> + + * mm-uu.el (mm-uu-pgp-encrypted-extract-1): Assume buffer is made + unibyte after clear-decrypt function runs. + + * mml2015.el (mml2015-pgg-clear-decrypt): Treat data which pgg + returns as a unibyte string. + 2006-04-27 Katsumi Yamaoka <yamaoka@jpl.org> * lpath.el: Don't fbind string-as-multibyte for XEmacs. diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el index 944e40bc964..9d9d87a3670 100644 --- a/lisp/gnus/mm-uu.el +++ b/lisp/gnus/mm-uu.el @@ -436,11 +436,18 @@ Return that buffer." "OK"))) (progn ;; Decode charset. - (when (and (or charset - (setq charset gnus-newsgroup-charset)) - (setq charset (mm-charset-to-coding-system charset)) - (not (eq charset 'ascii))) - (mm-decode-coding-region (point-min) (point-max) charset)) + (if (and (or charset + (setq charset gnus-newsgroup-charset)) + (setq charset (mm-charset-to-coding-system charset)) + (not (eq charset 'ascii))) + ;; Assume that buffer's multibyteness is turned off. + ;; See `mml2015-pgg-clear-decrypt'. + (insert (mm-decode-coding-string (prog1 + (buffer-string) + (erase-buffer) + (mm-enable-multibyte)) + charset)) + (mm-enable-multibyte)) (list (mm-make-handle buf mm-uu-text-plain-type))) (list (mm-make-handle buf '("application/pgp-encrypted"))))))) diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el index 80dd5b26597..591ef647678 100644 --- a/lisp/gnus/mml2015.el +++ b/lisp/gnus/mml2015.el @@ -707,6 +707,8 @@ (buffer-string)))) (progn (erase-buffer) + ;; Treat data which pgg returns as a unibyte string. + (mm-disable-multibyte) (insert-buffer-substring pgg-output-buffer) (goto-char (point-min)) (while (search-forward "\r\n" nil t) |
