Subject: bug#35766: emacs saves utf-16 le xml files as utf-16 be

From: Eli Zaretskii <[email-masked]>
Date: Sun, 19 May 2019 07:58:01 +0300

On May 18, 2019 11:57:51 PM GMT+03:00, J S <[email-masked]> wrote:
> RFC 2781 under "4.3 Interpreting text labelled as UTF-16" says is that
> if a document is labelled "UTF-16", the application should check the
> byte order mark to see if it is little endian or big endian   Only if
> there's no byte order mark, should the document be interpreted as big
> endian.
> 

If you are talking about visiting an existing file, then the change I installed does just that.  I was talking about saving a file, in which case there's no BOM, since it isn't present in the buffer