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)
This commit is contained in:
parent
7851ae8b44
commit
df7ed10e4f
1 changed files with 5 additions and 1 deletions
|
@ -2500,7 +2500,11 @@ This function is intended to be added to `auto-coding-functions'."
|
||||||
(let ((sym-type (coding-system-type sym))
|
(let ((sym-type (coding-system-type sym))
|
||||||
(bfcs-type
|
(bfcs-type
|
||||||
(coding-system-type buffer-file-coding-system)))
|
(coding-system-type buffer-file-coding-system)))
|
||||||
(if (and (coding-system-equal 'utf-8 sym-type)
|
;; 'charset' will signal an error in
|
||||||
|
;; coding-system-equal, since it isn't a
|
||||||
|
;; coding-system. So test that up front.
|
||||||
|
(if (and (not (equal sym-type 'charset))
|
||||||
|
(coding-system-equal 'utf-8 sym-type)
|
||||||
(coding-system-equal 'utf-8 bfcs-type))
|
(coding-system-equal 'utf-8 bfcs-type))
|
||||||
buffer-file-coding-system
|
buffer-file-coding-system
|
||||||
sym))
|
sym))
|
||||||
|
|
Loading…
Add table
Reference in a new issue