aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-11-19 18:36:42 +0200
committerEli Zaretskii2018-11-19 18:36:42 +0200
commitdf7ed10e4f15d3ea8b4426f7721bafe60bf8deeb (patch)
tree1488fc3b65d4bb9b5f0bb3a1228952d26cc00649
parent7851ae8b443c62a41ea4f4440512aa56cc87b9b7 (diff)
downloademacs-df7ed10e4f15d3ea8b4426f7721bafe60bf8deeb.tar.gz
emacs-df7ed10e4f15d3ea8b4426f7721bafe60bf8deeb.zip
Fix decoding XML files encoded in ISO-8859
* lisp/international/mule.el (sgml-xml-auto-coding-function): Avoid signaling an error from coding-system-equal when the XML encoding tag specifies an encoding whose type is 'charset'. (Bug#33429)
-rw-r--r--lisp/international/mule.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 14888100020..979845b7233 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2500,7 +2500,11 @@ This function is intended to be added to `auto-coding-functions'."
2500 (let ((sym-type (coding-system-type sym)) 2500 (let ((sym-type (coding-system-type sym))
2501 (bfcs-type 2501 (bfcs-type
2502 (coding-system-type buffer-file-coding-system))) 2502 (coding-system-type buffer-file-coding-system)))
2503 (if (and (coding-system-equal 'utf-8 sym-type) 2503 ;; 'charset' will signal an error in
2504 ;; coding-system-equal, since it isn't a
2505 ;; coding-system. So test that up front.
2506 (if (and (not (equal sym-type 'charset))
2507 (coding-system-equal 'utf-8 sym-type)
2504 (coding-system-equal 'utf-8 bfcs-type)) 2508 (coding-system-equal 'utf-8 bfcs-type))
2505 buffer-file-coding-system 2509 buffer-file-coding-system
2506 sym)) 2510 sym))