;;; Code:
(require 'emu)
+(require 'mime-def)
;;; @ Quoted-Printable encoder
;;;
-(defconst quoted-printable-hex-chars "0123456789ABCDEF")
-
(defsubst quoted-printable-quote-char (character)
(concat
"="
(save-restriction
(narrow-to-region start end)
(goto-char start)
- (let ((col 0)
- enable-multibyte-characters)
+ (let ((col 0))
(while (< (point)(point-max))
(cond ((>= col 75)
(insert "=\n")
(setq col 0)
)
- ((looking-at "^From ")
+ ((looking-at-as-unibyte "^From ")
(replace-match "=46rom ")
(backward-char 1)
(setq col (+ col 6))
)
- ((looking-at "[ \t]\n")
+ ((looking-at-as-unibyte "[ \t]\n")
(forward-char 1)
(insert "=\n")
(forward-char 1)
)))
string "")))
-(defconst quoted-printable-octet-regexp
- (concat "=[" quoted-printable-hex-chars
- "][" quoted-printable-hex-chars "]"))
-
(defun quoted-printable-internal-decode-region (start end)
(save-excursion
(save-restriction
(setq e (match-end 0))
(setq str (buffer-substring b e))
(delete-region b e)
- (insert (quoted-printable-decode-string str))
+ (insert (string-as-multibyte (quoted-printable-decode-string str)))
))
)))