]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix decoding HTML files from archives
authorBenjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Tue, 17 Jan 2023 18:08:15 +0000 (20:08 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sun, 22 Jan 2023 14:05:39 +0000 (16:05 +0200)
* 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#61005)

This is the same fix as in #df7ed10e for
sgml-xml-auto-coding-function.

lisp/international/mule.el

index eddd7b6407a7ddfbc059bf219c4a81ca6a357dcf..52019697ad7b4cd47aa5d6833de9717370f67ed8 100644 (file)
@@ -2540,6 +2540,10 @@ This function is intended to be added to `auto-coding-functions'."
                   (bfcs-type
                    (coding-system-type buffer-file-coding-system)))
               (if (and enable-multibyte-characters
+                       ;; 'charset' will signal an error in
+                       ;; coding-system-equal, since it isn't a
+                       ;; coding-system.  So test that up front.
+                       (not (equal sym-type 'charset))
                        (coding-system-equal 'utf-8 sym-type)
                        (coding-system-equal 'utf-8 bfcs-type))
                   buffer-file-coding-system