Function: eww-detect-charset
eww-detect-charset is a byte-compiled function defined in eww.el.gz.
Signature
(eww-detect-charset HTML-P)
Source Code
;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defun eww-detect-charset (html-p)
(let ((case-fold-search t)
(pt (point)))
(or (and html-p
(re-search-forward
"<meta[\t\n\r ]+[^>]*charset=\"?\\([^\t\n\r \"/>]+\\)[\\\"'.*]" nil t)
(goto-char pt)
(match-string 1))
(and (looking-at
"[\t\n\r ]*<\\?xml[\t\n\r ]+[^>]*encoding=\"\\([^\"]+\\)")
(match-string 1)))))