From: Kenichi Handa <handa@m17n.org>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: emacs-devel@gnu.org, miles@gnu.org
Subject: Re: auto-recognizing utf-16le ?
Date: Tue, 16 Jun 2009 11:04:15 +0900 [thread overview]
Message-ID: <E1MGO23-0006ma-LK@etlken> (raw)
In-Reply-To: <m2r5xlw4qp.fsf@igel.home> (message from Andreas Schwab on Mon, 15 Jun 2009 23:45:34 +0200)
In article <m2r5xlw4qp.fsf@igel.home>, Andreas Schwab <schwab@linux-m68k.org> writes:
> Miles Bader <miles.bader@necel.com> writes:
> > Someone on #emacs noticed that emacs doesn't seem to auto-recognize
> > files encoding using utf-16le.
> UTF-16 detection never tries to auto detect files without a signature.
No. detect_coding_utf_16 tries to check if the file is
UTF-16 or not by checking the dispersion of Eth and Oth
bytes where E is even and O is odd. But, there were two
bugs in the code. One was already fixed by this change.
2009-06-15 Andreas Schwab <schwab@linux-m68k.org>
* coding.c (detect_coding_utf_16): Fix typo counting odd bytes.
And, I've just installed a fix of another bug.
So, with the latest code, if you set
inhibit-null-byte-detection to t, and prefer utf-16be and/or
utf-16le, Emacs will detect UTF-16 files without BOM in most
cases.
---
Kenichi Handa
handa@m17n.org
next prev parent reply other threads:[~2009-06-16 2:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 11:40 auto-recognizing utf-16le ? Miles Bader
2009-06-15 21:45 ` Andreas Schwab
2009-06-16 0:20 ` Miles Bader
2009-06-16 2:04 ` Kenichi Handa [this message]
2009-06-16 15:01 ` Andreas Schwab
2009-06-17 0:43 ` Kenichi Handa
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=E1MGO23-0006ma-LK@etlken \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=schwab@linux-m68k.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.