From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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: Sat, 11 Aug 2018 12:15:31 +0300 Message-ID: <83a7ptmfgs.fsf@gnu.org> References: <555E2912.7060509@gmx.net> <83iobl67ao.fsf@gnu.org> <555E44EB.6070604@gmx.net> <83egm95boc.fsf@gnu.org> <555F2D3C.6090608@gmx.net> <8660oxdyxy.fsf@realize.ch> <457eu2h1sk.fsf@fencepost.gnu.org> <20180808094748.GA26509@zira.vinc17.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1533978850 19340 195.159.176.226 (11 Aug 2018 09:14:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2018 09:14:10 +0000 (UTC) Cc: a.s@realize.ch, monnier@iro.umontreal.ca, 20623-done@debbugs.gnu.org, sledergerber@gmx.net To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 11 11:14:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foPyG-0004tE-T1 for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2018 11:14:05 +0200 Original-Received: from localhost ([::1]:59409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foQ0M-0004Rf-PR for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Aug 2018 05:16:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foQ0B-0004R1-Ix for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 05:16:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foQ0A-00086f-Az for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 05:16:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42766) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1foQ0A-00086W-6t for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 05:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1foQ0A-0005w5-1A for bug-gnu-emacs@gnu.org; Sat, 11 Aug 2018 05:16:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Aug 2018 09:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 20623 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 20623@debbugs.gnu.org, eliz@gnu.org, sledergerber@gmx.net Original-Received: via spool by 20623-done@debbugs.gnu.org id=D20623.153397894122786 (code D ref 20623); Sat, 11 Aug 2018 09:16:01 +0000 Original-Received: (at 20623-done) by debbugs.gnu.org; 11 Aug 2018 09:15:41 +0000 Original-Received: from localhost ([127.0.0.1]:47783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foPzo-0005vS-Tl for submit@debbugs.gnu.org; Sat, 11 Aug 2018 05:15:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1foPzo-0005vH-0V for 20623-done@debbugs.gnu.org; Sat, 11 Aug 2018 05:15:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1foPze-0007sk-R9 for 20623-done@debbugs.gnu.org; Sat, 11 Aug 2018 05:15:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1foPze-0007sd-Mq; Sat, 11 Aug 2018 05:15:30 -0400 Original-Received: from [176.228.60.248] (port=2187 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1foPzd-0007lz-Pm; Sat, 11 Aug 2018 05:15:30 -0400 In-reply-to: <20180808094748.GA26509@zira.vinc17.org> (message from Vincent Lefevre on Wed, 8 Aug 2018 11:47:48 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149427 Archived-At: > Date: Wed, 8 Aug 2018 11:47:48 +0200 > From: Vincent Lefevre > Cc: Glenn Morris , Simon Ledergerber , > Eli Zaretskii , Alain Schneble , > 20623@debbugs.gnu.org > > On 2017-12-04 12:38:57 -0500, Stefan Monnier wrote: > > > Now reported with "fix this or get removed from the distribution" > > > severity at . > > > > 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. I agree with the last paragraph, so I've now fixed the remaining issue of this bug (with HTML files) on the emacs-26 branch. However, I would respectfully request that in the future bug reports be accurate and fair in the assigned severity, and in particular make sure that the severity matches the actual behavior as judged objectively. In this case, I cannot but express my extreme surprise to see such a minor issue described as "grave". The alleged data loss is minor, if it exists at all (the BOM is not data important for the user, nor data whose loss cannot be easily repaired). The unspecified "breakage in other applications" cannot be considered without the missing details, but in general I'd be surprised to hear about modern applications (browsers?) that really need a BOM in UTF-8 encoded HTML files to the degree that the lack of BOM causes them to "break" in some way; if they do, it could arguably be a bug in those applications. Bottom line: artificially and unreasonably increasing the severity level doesn't help the motivation to fix the bug, and if anything, has the opposite effect of ignoring the source of the bug report as not serious. I'm sure we don't want that, certainly not for bugs reported by Debian. Thanks.