Function: encoded-string-description

encoded-string-description is a byte-compiled function defined in mule-cmds.el.gz.

Signature

(encoded-string-description STR CODING-SYSTEM)

Documentation

Return a pretty description of STR that is encoded by CODING-SYSTEM.

STR should be a unibyte string.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun encoded-string-description (str coding-system)
  "Return a pretty description of STR that is encoded by CODING-SYSTEM.
STR should be a unibyte string."
  (cl-assert (not (multibyte-string-p str)))
  (mapconcat
   (if (and coding-system (eq (coding-system-type coding-system) 'iso-2022))
       ;; Try to get a pretty description for ISO 2022 escape sequences.
       (lambda (x) (or (cdr (assq x iso-2022-control-alist))
                  (format "#x%02X" x)))
     (lambda (x) (format "#x%02X" x)))
   str " "))