GNU bug report logs - #35766
emacs saves utf-16 le xml files as utf-16 be

Previous Next

Package: emacs;

Reported by: J S <jszabo_98 <at> hotmail.com>

Date: Thu, 16 May 2019 17:58:01 UTC

Severity: normal

Merged with 8282, 8283

Fixed in version 27.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: J S <jszabo_98 <at> hotmail.com>
To: "npostavs <at> gmail.com" <npostavs <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: "35766 <at> debbugs.gnu.org" <35766 <at> debbugs.gnu.org>
Subject: bug#35766: emacs saves utf-16 le xml files as utf-16 be
Date: Fri, 17 May 2019 16:57:23 +0000
[Message part 1 (text/plain, inline)]
When an xml file just says encoding="UTF-16", how does an application pick big endian vs little endian?

________________________________
From: npostavs <at> gmail.com <npostavs <at> gmail.com>
Sent: Friday, May 17, 2019 4:27 PM
To: Eli Zaretskii
Cc: Noam Postavsky; 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

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

By the way, is Bug#8282 the same as this one, or just closely related?
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.
There is also nxml-set-auto-coding which seems to be mostly unused.
[Message part 2 (text/html, inline)]

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.