Function: epg--decode-percent-escape
epg--decode-percent-escape is a byte-compiled function defined in
epg.el.gz.
Signature
(epg--decode-percent-escape STRING)
Source Code
;; Defined in /usr/src/emacs/lisp/epg.el.gz
;;; Decode Functions
(defun epg--decode-percent-escape (string)
(setq string (encode-coding-string string 'raw-text))
(let ((index 0))
(while (string-match "%\\(\\(%\\)\\|\\([[:xdigit:]][[:xdigit:]]\\)\\)"
string index)
(if (match-beginning 2)
(setq string (replace-match "%" t t string)
index (1- (match-end 0)))
(setq string (replace-match
(byte-to-string
(string-to-number (match-string 3 string) 16))
t t string)
index (- (match-end 0) 2))))
string))