[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auto-recognizing utf-16le ?

From: Kenichi Handa
Subject: Re: auto-recognizing utf-16le ?
Date: Tue, 16 Jun 2009 11:04:15 +0900

In article <address@hidden>, Andreas Schwab <address@hidden> writes:

> Miles Bader <address@hidden> 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  <address@hidden>

        * 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

Kenichi Handa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]