From: Rob Browning Date: Sun, 26 Aug 2018 16:44:45 +0000 (-0500) Subject: Don't unexpectedly modify the byte order mark X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~189 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7dd899126eb651e15f5d2c6eaf0cddb7cfe4e4a7;p=emacs.git Don't unexpectedly modify the byte order mark Add 0014-Emacs-should-no-longer-unexpectedly-alter-the-byte-o.patch to fix the problem. Thanks to Vincent Lefevre for reporting the problem and Eli Zaretskii for the patch. Closes: 883434 --- 7dd899126eb651e15f5d2c6eaf0cddb7cfe4e4a7 diff --cc debian/.git-dpm index e412ed54519,00000000000..951bb7d3ddc mode 100644,000000..100644 --- a/debian/.git-dpm +++ b/debian/.git-dpm @@@ -1,8 -1,0 +1,8 @@@ +# see git-dpm(1) from git-dpm package - 21c38e366f7bc1497b4bd113e4f8564ef6ccbc17 - 21c38e366f7bc1497b4bd113e4f8564ef6ccbc17 ++bc952e642091959638f819a1e4617deccfef97d0 ++bc952e642091959638f819a1e4617deccfef97d0 +09a20fd582947ca08f0e80bc5353ae8abfe1e5ed +09a20fd582947ca08f0e80bc5353ae8abfe1e5ed +emacs_25.2+1.orig.tar.xz +ad6c8e3147a990ee49a3e68196751b9f1763919c +23186732 diff --cc debian/patches/0014-Emacs-should-no-longer-unexpectedly-alter-the-byte-o.patch index 00000000000,00000000000..10a6c7b87b9 new file mode 100644 --- /dev/null +++ b/debian/patches/0014-Emacs-should-no-longer-unexpectedly-alter-the-byte-o.patch @@@ -1,0 -1,0 +1,55 @@@ ++From bc952e642091959638f819a1e4617deccfef97d0 Mon Sep 17 00:00:00 2001 ++From: Eli Zaretskii ++Date: Fri, 15 Dec 2017 11:06:07 +0200 ++Subject: Emacs should no longer unexpectedly alter the byte order mark ++ ++This upstream patch has been incorporated to fix the problem: ++ ++ Better support utf-8-with-signature and utf-8-hfs in XML/HTML ++ ++ * lisp/international/mule.el (sgml-xml-auto-coding-function): ++ Support UTF-8 with BOM and utf-8-hfs as variants of UTF-8, and ++ obey the buffer's encoding if it is one of these variants, instead ++ of re-encoding in UTF-8 proper. (Bug#20623) ++ ++Origin: backport, commit: 889f07c352f7e0deccf59353a60a45f2716551d8) ++Bug: https://bugs.gnu.org/20623 ++Bug-Debian: http://bugs.debian.org/883434 ++Forwarded: not-needed ++--- ++ lisp/international/mule.el | 15 +++++++++++++-- ++ 1 file changed, 13 insertions(+), 2 deletions(-) ++ ++diff --git a/lisp/international/mule.el b/lisp/international/mule.el ++index 3da722d9f1b..ade76004d44 100644 ++--- a/lisp/international/mule.el +++++ b/lisp/international/mule.el ++@@ -2493,7 +2493,17 @@ sgml-xml-auto-coding-function ++ (let* ((match (match-string 1)) ++ (sym (intern (downcase match)))) ++ (if (coding-system-p sym) ++- sym +++ ;; If the encoding tag is UTF-8 and the buffer's +++ ;; encoding is one of the variants of UTF-8, use the +++ ;; buffer's encoding. This allows, e.g., saving an +++ ;; XML file as UTF-8 with BOM when the tag says UTF-8. +++ (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) +++ (coding-system-equal 'utf-8 bfcs-type)) +++ buffer-file-coding-system +++ sym)) ++ (message "Warning: unknown coding system \"%s\"" match) ++ nil)) ++ ;; Files without an encoding tag should be UTF-8. But users ++@@ -2506,7 +2516,8 @@ sgml-xml-auto-coding-function ++ (coding-system-base ++ (detect-coding-region (point-min) size t))))) ++ ;; Pure ASCII always comes back as undecided. ++- (if (memq detected '(utf-8 undecided)) +++ (if (memq detected +++ '(utf-8 'utf-8-with-signature 'utf-8-hfs undecided)) ++ 'utf-8 ++ (warn "File contents detected as %s. ++ Consider adding an encoding attribute to the xml declaration, diff --cc debian/patches/series index 9868d6b6979,00000000000..9feb202b135 mode 100644,000000..100644 --- a/debian/patches/series +++ b/debian/patches/series @@@ -1,13 -1,0 +1,14 @@@ +0001-Prefer-usr-share-info-emacs.patch +0002-Run-debian-startup-and-set-debian-emacs-flavor.patch +0003-Remove-files-that-appear-to-be-incompatible-with-the.patch +0004-Adjust-documentation-references-for-Debian.patch +0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch +0006-Don-t-try-to-build-src-macuvs.h-via-IVD_Sequences.tx.patch +0007-Kill-gpg-agent-in-package-test.el-to-avoid-a-race.patch +0008-Don-t-provide-openssl-s_client-as-an-option-for-ssl-.patch +0009-A-memory-alignment-problem-causing-m68k-failures-has.patch +0010-Don-t-downcase-real-xref-in-elisp-mode-tests.patch +0011-Disable-eieio-test-method-order-list-6.patch +0012-A-remote-execution-exploit-via-enriched-text-has-bee.patch +0013-Disable-eieio-test-37-obsolete-name-in-constructor.patch ++0014-Emacs-should-no-longer-unexpectedly-alter-the-byte-o.patch