Function: utf7-fragment-decode

utf7-fragment-decode is a byte-compiled function defined in utf7.el.gz.

Signature

(utf7-fragment-decode START END &optional FOR-IMAP)

Documentation

Decode base64 encoded fragment from START to END of UTF-7 text in buffer.

Use IMAP modification if FOR-IMAP is non-nil.

Source Code

;; Defined in /usr/src/emacs/lisp/international/utf7.el.gz
(defun utf7-fragment-decode (start end &optional for-imap)
  "Decode base64 encoded fragment from START to END of UTF-7 text in buffer.
Use IMAP modification if FOR-IMAP is non-nil."
  (save-restriction
    (narrow-to-region start end)
    (when for-imap
      (goto-char start)
      (while (search-forward "," nil 'move-to-end) (replace-match "/")))
    (let ((pl (utf7-imap-get-pad-length (- end start) 4)))
      (insert (make-string pl ?=))
      (base64-decode-region start (+ end pl)))
    (funcall (utf7-get-u16char-converter 'from-utf-16))))