From: Dave Love Date: Mon, 7 Oct 2002 17:39:34 +0000 (+0000) Subject: (quoted-printable-encode-region): Go to start of range X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~274 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9601565f67fcabe286a5cd7f6e106776381544b5;p=emacs.git (quoted-printable-encode-region): Go to start of range before searching. (quoted-printable-encode-region): Use multibyte-char-to-unibyte. --- 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 encode lines starting with \"From\"." (interactive "r") (save-excursion + (goto-char from) + ;; Fixme: This doesn't get eight-bit characters in multibyte buffers. (if (re-search-forward "[^\x0-\xff]" to t) (error "Multibyte character in QP encoding region"))) (unless class @@ -108,7 +110,8 @@ encode lines starting with \"From\"." (not (eobp))) (insert (prog1 - (format "=%02X" (char-after)) + ;; To unibyte in case of eight-bit-{control,graphics} + (format "=%02X" (multibyte-char-to-unibyte (char-after))) (delete-char 1)))) ;; Encode white space at the end of lines. (goto-char (point-min))