Try saving this xml file and opening it again: ________________________________ From: J S Sent: Thursday, May 16, 2019 7:15 PM To: Eli Zaretskii Subject: Re: bug#35766: emacs saves utf-16 le xml files as utf-16 be Try saving this xml file and opening it again: ________________________________ From: Eli Zaretskii Sent: Thursday, May 16, 2019 6:22 PM To: J S Cc: 35766@debbugs.gnu.org Subject: Re: bug#35766: emacs saves utf-16 le xml files as utf-16 be > From: J S > Date: Thu, 16 May 2019 17:11:21 +0000 > > Xml files with this tag are saved as utf-16 be by emacs, even if the file was originally utf-16 le. Using > "UTF-16LE" instead will break the encoding and remove the BOM. > > Did you try using utf-16le-with-signature? Or maybe I don't understand the scenario: would you please describe a full reproduction recipe, starting from "emacs -Q"? Thanks.