]> git.eshelyaron.com Git - emacs.git/commitdiff
(quoted-printable-encode-region): Go to start of range
authorDave Love <fx@gnu.org>
Mon, 7 Oct 2002 17:39:34 +0000 (17:39 +0000)
committerDave Love <fx@gnu.org>
Mon, 7 Oct 2002 17:39:34 +0000 (17:39 +0000)
before searching.
(quoted-printable-encode-region): Use multibyte-char-to-unibyte.

lisp/gnus/qp.el

index 26d3151bfc4c6636eab04ba2e569ef0d2bf422f0..136dbd0c9cb175c99da642e62c432ad3509fe2d8 100644 (file)
@@ -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))