GNU bug report logs - #8282
sgml-xml-auto-coding-function() should respect the *-with-signature-* coding

Previous Next

Package: emacs;

Reported by: LIN Sumang <linsumang <at> gmail.com>

Date: Fri, 18 Mar 2011 13:34:01 UTC

Severity: normal

Merged with 8283, 35766

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: npostavs <at> gmail.com
Cc: jszabo_98 <at> hotmail.com, 35766 <at> debbugs.gnu.org
Subject: Re: bug#35766: emacs saves utf-16 le xml files as utf-16 be
Date: Sat, 18 May 2019 10:26:09 +0300
merge 8282 35766
close 36766
thanks

> From: npostavs <at> gmail.com
> Cc: Noam Postavsky <npostavs <at> gmail.com>,  jszabo_98 <at> hotmail.com,  35766 <at> debbugs.gnu.org
> Date: Fri, 17 May 2019 12:27:50 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Perhaps we should by default produce encoding with BOM when XML header
> > specifies UTF-16?
> 
> I think yes, https://www.w3.org/TR/xml/#charencoding says
> 
>     Entities encoded in UTF-16 MUST [...] begin with the Byte Order Mark

OK, I did that as well, and pushed the changes to master.

> By the way, is Bug#8282 the same as this one, or just closely related?

It's the same problem; merged the bugs.

> It's talking about sgml-html-meta-auto-coding-function (though maybe
> sgml-xml-auto-coding-function is more relevant).  I'm getting a little
> confused between all the different *-find/auto-coding-* functions.

The function relevant for the recipe in bug#8282 is
sgml-xml-auto-coding-function, which is where I made the changes.  If
the HTML and/or SGML specs also mandate that we use BOM, then maybe we
need the same changes in sgml-html-meta-auto-coding-function as well.
Note that there's no equivalent for xml-find-file-coding-system for
non-XML files, so recognition of visited UTF-16 HTML files will not
work even if they do have a BOM.

> There is also nxml-set-auto-coding which seems to be mostly unused.

It is supposed to be used by packages that build on top of nXml,
AFAIU.

Thanks.




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

Previous Next


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