Commit 9601565f authored by Dave Love's avatar Dave Love
Browse files

(quoted-printable-encode-region): Go to start of range

before searching.
(quoted-printable-encode-region): Use multibyte-char-to-unibyte.
parent ba5e343c
......@@ -93,6 +93,8 @@ If `mm-use-ultra-safe-encoding' is set, fold lines unconditionally and
encode lines starting with \"From\"."
(interactive "r")
(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)))
(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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment