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


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

From: J S <jszabo_98 <at> hotmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "35766 <at> debbugs.gnu.org" <35766 <at> debbugs.gnu.org>,
 "npostavs <at> gmail.com" <npostavs <at> gmail.com>
Subject: Re: bug#35766: emacs saves utf-16 le xml files as utf-16 be
Date: Fri, 17 May 2019 20:16:41 +0000
[Message part 1 (text/plain, inline)]
For example, if I save this xml file in emacs, it saves it as utf-16 big endian:


<?xml version="1.0" encoding="UTF-16"?>

If I do this in powershell (really a .net method), it saves it as utf-16 little endian (osx or windows):

[xml]$xml = get-content file.xml
$xml.save('file.xml')


________________________________
From: Eli Zaretskii <eliz <at> gnu.org>
Sent: Friday, May 17, 2019 7:46 PM
To: J S
Cc: npostavs <at> gmail.com; 35766 <at> debbugs.gnu.org
Subject: Re: bug#35766: emacs saves utf-16 le xml files as utf-16 be

> From: J S <jszabo_98 <at> hotmail.com>
> CC: "35766 <at> debbugs.gnu.org" <35766 <at> debbugs.gnu.org>
> Date: Fri, 17 May 2019 16:57:23 +0000
>
> When an xml file just says encoding="UTF-16", how does an application pick big endian vs little endian?

What is "an application" in this context?
[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.