Add support for detecting encoding in HTML5 specified only as
<meta charset="UTF-8">. Implementation just makes http-equiv and
content-type parts from HTML4 encoding string optional.
Fixes: debbugs:9716
+2011-10-18 Jirka Kosek <jirka@kosek.cz> (tiny change)
+
+ * international/mule.el (sgml-html-meta-auto-coding-function):
+ Add support for detecting encoding in HTML5 specified only as
+ <meta charset="UTF-8">. Implementation just makes http-equiv and
+ content-type parts from HTML4 encoding string optional. (Bug#9716)
+
2011-10-18 Glenn Morris <rgm@gnu.org>
* vc/vc.el (vc-initial-comment): Mark as obsolete. (Bug#9745)
;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is
;; useful for Mozilla bookmark files.
(when (and (re-search-forward "\\`[[:space:]\n]*\\(<!doctype[[:space:]\n]+\\(html\\|netscape\\)\\|<html\\)" size t)
- (re-search-forward "<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']" size t))
- (let* ((match (match-string 1))
+ (re-search-forward "<meta\\s-+\\(http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*\\)?charset=[\"']?\\(.+?\\)[\"'\\s-/>]" size t))
+ (let* ((match (match-string 2))
(sym (intern (downcase match))))
(if (coding-system-p sym)
sym