diff options
| author | Jirka Kosek | 2011-10-18 11:02:47 +0300 |
|---|---|---|
| committer | Juri Linkov | 2011-10-18 11:02:47 +0300 |
| commit | b31a56772363013e4aed416c6b05e77c7b5a9f07 (patch) | |
| tree | 2806d7ca535392bdf9d2418305dfc16e4a24af3f | |
| parent | 80c6d77f2dd99752b1a4090350414a66b7409e7e (diff) | |
| download | emacs-b31a56772363013e4aed416c6b05e77c7b5a9f07.tar.gz emacs-b31a56772363013e4aed416c6b05e77c7b5a9f07.zip | |
* lisp/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.
Fixes: debbugs:9716
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/international/mule.el | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0562f2f2fa0..7f03894e728 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-10-18 Jirka Kosek <jirka@kosek.cz> (tiny change) | ||
| 2 | |||
| 3 | * international/mule.el (sgml-html-meta-auto-coding-function): | ||
| 4 | Add support for detecting encoding in HTML5 specified only as | ||
| 5 | <meta charset="UTF-8">. Implementation just makes http-equiv and | ||
| 6 | content-type parts from HTML4 encoding string optional. (Bug#9716) | ||
| 7 | |||
| 1 | 2011-10-18 Glenn Morris <rgm@gnu.org> | 8 | 2011-10-18 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * vc/vc.el (vc-initial-comment): Mark as obsolete. (Bug#9745) | 10 | * vc/vc.el (vc-initial-comment): Mark as obsolete. (Bug#9745) |
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 4a387a233a0..cac37b3b8c5 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -2403,8 +2403,8 @@ This function is intended to be added to `auto-coding-functions'." | |||
| 2403 | ;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is | 2403 | ;; (allowing for whitespace at bob). Note: 'DOCTYPE NETSCAPE' is |
| 2404 | ;; useful for Mozilla bookmark files. | 2404 | ;; useful for Mozilla bookmark files. |
| 2405 | (when (and (re-search-forward "\\`[[:space:]\n]*\\(<!doctype[[:space:]\n]+\\(html\\|netscape\\)\\|<html\\)" size t) | 2405 | (when (and (re-search-forward "\\`[[:space:]\n]*\\(<!doctype[[:space:]\n]+\\(html\\|netscape\\)\\|<html\\)" size t) |
| 2406 | (re-search-forward "<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*charset=\\(.+?\\)[\"']" size t)) | 2406 | (re-search-forward "<meta\\s-+\\(http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']text/\\sw+;\\s-*\\)?charset=[\"']?\\(.+?\\)[\"'\\s-/>]" size t)) |
| 2407 | (let* ((match (match-string 1)) | 2407 | (let* ((match (match-string 2)) |
| 2408 | (sym (intern (downcase match)))) | 2408 | (sym (intern (downcase match)))) |
| 2409 | (if (coding-system-p sym) | 2409 | (if (coding-system-p sym) |
| 2410 | sym | 2410 | sym |