aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDave Love2002-10-07 17:39:34 +0000
committerDave Love2002-10-07 17:39:34 +0000
commit9601565f67fcabe286a5cd7f6e106776381544b5 (patch)
tree0f7f21a803128fc7a457133ec761ada05df94573 /lisp
parentba5e343cadd7ea40cb5508f8823f3872161d3110 (diff)
downloademacs-9601565f67fcabe286a5cd7f6e106776381544b5.tar.gz
emacs-9601565f67fcabe286a5cd7f6e106776381544b5.zip
(quoted-printable-encode-region): Go to start of range
before searching. (quoted-printable-encode-region): Use multibyte-char-to-unibyte.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/qp.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/gnus/qp.el b/lisp/gnus/qp.el
index 26d3151bfc4..136dbd0c9cb 100644
--- a/lisp/gnus/qp.el
+++ b/lisp/gnus/qp.el
@@ -93,6 +93,8 @@ If `mm-use-ultra-safe-encoding' is set, fold lines unconditionally and
93encode lines starting with \"From\"." 93encode lines starting with \"From\"."
94 (interactive "r") 94 (interactive "r")
95 (save-excursion 95 (save-excursion
96 (goto-char from)
97 ;; Fixme: This doesn't get eight-bit characters in multibyte buffers.
96 (if (re-search-forward "[^\x0-\xff]" to t) 98 (if (re-search-forward "[^\x0-\xff]" to t)
97 (error "Multibyte character in QP encoding region"))) 99 (error "Multibyte character in QP encoding region")))
98 (unless class 100 (unless class
@@ -108,7 +110,8 @@ encode lines starting with \"From\"."
108 (not (eobp))) 110 (not (eobp)))
109 (insert 111 (insert
110 (prog1 112 (prog1
111 (format "=%02X" (char-after)) 113 ;; To unibyte in case of eight-bit-{control,graphics}
114 (format "=%02X" (multibyte-char-to-unibyte (char-after)))
112 (delete-char 1)))) 115 (delete-char 1))))
113 ;; Encode white space at the end of lines. 116 ;; Encode white space at the end of lines.
114 (goto-char (point-min)) 117 (goto-char (point-min))