* utf-16
@ 2014-05-16 12:19 Dirk Zabel
2014-05-16 14:52 ` utf-16 Eli Zaretskii
2014-05-16 15:16 ` utf-16 Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Dirk Zabel @ 2014-05-16 12:19 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I have a file with marker "# -*- utf-16 -*- in line 1.
How does emacs decide, wich coding system is used exactly if this file
is written? What I get is utf-16-be-with-signature. What I want is
utf-16-le-with-signature. Is there any variable which influences the
interpretation of "utf-16" ?
Regards
Dirk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: utf-16
2014-05-16 12:19 utf-16 Dirk Zabel
@ 2014-05-16 14:52 ` Eli Zaretskii
2014-05-16 15:16 ` utf-16 Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2014-05-16 14:52 UTC (permalink / raw)
To: help-gnu-emacs
> From: Dirk Zabel <zabel@riccius-sohn.eu>
> Date: Fri, 16 May 2014 14:19:28 +0200
>
> I have a file with marker "# -*- utf-16 -*- in line 1.
>
> How does emacs decide, wich coding system is used exactly if this file
> is written? What I get is utf-16-be-with-signature. What I want is
> utf-16-le-with-signature. Is there any variable which influences the
> interpretation of "utf-16" ?
Just change that line to say "utf-16-le" instead.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: utf-16
2014-05-16 12:19 utf-16 Dirk Zabel
2014-05-16 14:52 ` utf-16 Eli Zaretskii
@ 2014-05-16 15:16 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2014-05-16 15:16 UTC (permalink / raw)
To: help-gnu-emacs
> I have a file with marker "# -*- utf-16 -*- in line 1.
[ This is a problematic case in itself: to read the "-*- utf-16 -*-" Emacs
needs to know what byte-sequence represents, say, the character "u".
But at that time (when decoding the file), it can't know yet that it
will end up saying say "u" is encoded using utf-16. ]
> Is there any variable which influences the interpretation of
> "utf-16" ?
General rule: don't use "-*- coding: utf-16 -*-".
Better use C-x RET f utf-16-le-with-signature RET before writing the file.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-16 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 12:19 utf-16 Dirk Zabel
2014-05-16 14:52 ` utf-16 Eli Zaretskii
2014-05-16 15:16 ` utf-16 Stefan Monnier
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.