GNU bug report logs - #20623
XML and HTML files with encoding/charset="utf-8" declaration lose BOM; Coding system is reset from utf-8-with-signature to utf-8 on save

Previous Next

Package: emacs;

Reported by: Simon Ledergerber <sledergerber <at> gmx.net>

Date: Thu, 21 May 2015 18:53:02 UTC

Severity: normal

Found in version 26.1

Fixed in version 26.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #77 received at 20623 <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Glenn Morris <rgm <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 Alain Schneble <a.s <at> realize.ch>, 20623 <at> debbugs.gnu.org,
 Simon Ledergerber <sledergerber <at> gmx.net>
Subject: Re: bug#20623: XML and HTML files with encoding/charset="utf-8"
 declaration loose BOM; Coding system is reset from utf-8-with-signature to
 utf-8 on save
Date: Wed, 8 Aug 2018 11:47:48 +0200
On 2017-12-04 12:38:57 -0500, Stefan Monnier wrote:
> > Now reported with "fix this or get removed from the distribution"
> > severity at <https://bugs.debian.org/883434>.
> 
> I'm curious to see if the OP's "grave" severity settings will stick.
> "Grave" is defined in https://www.debian.org/Bugs/Developer#severities as:
> 
>     makes the package in question unusable or mostly so, or causes data
>     loss, or introduces a security hole allowing access to the accounts
>     of users who use the package.
> 
> The only part that could arguably apply is "causes data loss", but even
> that is stretching the meaning of those words, I think.

Actually there's the issue that the coding system (in Emacs sense)
is changed, but also the fact that this change is invisible to the
user (mainly because the BOM is usually not visible), which makes
the issue even worse. Basically, this is invisible data corruption.
Even though only two bytes are removed, this introduces breakage in
other applications, and it can take much time to the user to find
the cause.

Emacs should not change the coding system when not needed, and when
it needs to, it must make sure to have a confirmation from the user.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 6 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.