[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 df7ed10: Fix decoding XML files encoded in ISO-88
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 df7ed10: Fix decoding XML files encoded in ISO-8859 |
Date: |
Mon, 19 Nov 2018 11:37:40 -0500 (EST) |
branch: emacs-26
commit df7ed10e4f15d3ea8b4426f7721bafe60bf8deeb
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
lisp/international/mule.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 1488810..979845b 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'."
(let ((sym-type (coding-system-type sym))
(bfcs-type
(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))
buffer-file-coding-system
sym))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 df7ed10: Fix decoding XML files encoded in ISO-8859,
Eli Zaretskii <=