all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: J S <jszabo_98@hotmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "35766@debbugs.gnu.org" <35766@debbugs.gnu.org>
Subject: bug#35766: emacs saves utf-16 le xml files as utf-16 be
Date: Fri, 17 May 2019 11:26:14 +0000	[thread overview]
Message-ID: <BL0PR11MB3475F70B777717241FB7AB449E0B0@BL0PR11MB3475.namprd11.prod.outlook.com> (raw)
In-Reply-To: <83lfz5bfed.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

It would change color in emacs if encoding="UTF16-LE" were invalid.  It's hard to find the docs for it.  UTF-16LE is listed here:  http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.wst.xmleditor.doc.user%2Ftopics%2Fcxmlenc.html


________________________________
From: Eli Zaretskii <eliz@gnu.org>
Sent: Friday, May 17, 2019 9:26 AM
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 <jszabo_98@hotmail.com>
> CC: "35766@debbugs.gnu.org" <35766@debbugs.gnu.org>
> Date: Thu, 16 May 2019 20:57:34 +0000
>
> I should say that I'm using emacs for windows.  And it's preferring saving in big endian to little endian when
> this is the tag:
>
> <?xml version="1.0" encoding="UTF-16"?>

This is the default, yes.  "C-h C utf-16 RET" says:

  UTF-16 (detect endian on decoding, use big endian on encoding with BOM).
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you want to encode in UTF-16LE, you need to tell Emacs to do this
explicitly:

  C-x RET c utf-16le-with-signature RET C-x C-s

> Try saving this xml file and opening it again:
>
> <?xml version="1.0" encoding="UTF-16LE"?>

AFAIU, encoding="UTF-16LE" is invalid in XML.  If you see this
documented somewhere in XML docs, please tell me where it is
described.

[-- Attachment #2: Type: text/html, Size: 2872 bytes --]

  reply	other threads:[~2019-05-17 11:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 17:11 bug#35766: emacs saves utf-16 le xml files as utf-16 be J S
2019-05-16 18:22 ` Eli Zaretskii
     [not found]   ` <BL0PR11MB34754605999DC2A03A6DF45A9E0A0@BL0PR11MB3475.namprd11.prod.outlook.com>
2019-05-16 19:21     ` J S
2019-05-16 20:57       ` J S
2019-05-17  9:26         ` Eli Zaretskii
2019-05-17 11:26           ` J S [this message]
2019-05-17 11:48             ` Noam Postavsky
2019-05-17 15:34               ` Eli Zaretskii
2019-05-17 16:27                 ` npostavs
2019-05-17 16:57                   ` J S
2019-05-17 19:46                     ` Eli Zaretskii
2019-05-17 20:16                       ` J S
2019-05-18  5:33                         ` Eli Zaretskii
2019-05-18 20:57                           ` J S
2019-05-19  4:58                             ` Eli Zaretskii
2019-05-19 14:12                               ` J S
2019-05-18  7:26                   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BL0PR11MB3475F70B777717241FB7AB449E0B0@BL0PR11MB3475.namprd11.prod.outlook.com \
    --to=jszabo_98@hotmail.com \
    --cc=35766@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.