From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: coding tags and utf-16 Date: Wed, 04 Jan 2006 22:46:13 -0500 Message-ID: References: <20051221.090033.182620434.wl@gnu.org> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1136433009 20231 80.91.229.2 (5 Jan 2006 03:50:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 03:50:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 04:50:07 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EuM8a-0005ul-4z for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 04:50:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuMAI-0007X4-0s for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2006 22:51:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuM85-0006g5-SH for emacs-devel@gnu.org; Wed, 04 Jan 2006 22:49:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuM85-0006fk-0y for emacs-devel@gnu.org; Wed, 04 Jan 2006 22:49:33 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuM84-0006fb-Of for emacs-devel@gnu.org; Wed, 04 Jan 2006 22:49:32 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuM9a-0003qx-Ad for emacs-devel@gnu.org; Wed, 04 Jan 2006 22:51:06 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EuM4r-00051L-Sf; Wed, 04 Jan 2006 22:46:13 -0500 Original-To: Kenichi Handa In-reply-to: (message from Kenichi Handa on Wed, 04 Jan 2006 15:42:23 +0900) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48735 Archived-At: If a file is encoded without BOM, we must use the less reliable heuristics to guess utf-16be or utf-16le. If you find a coding-tag spec by ignoring all zero bytes at even byte indexes, it means that the file is, in high possibility, utf-16be whatever the tag value is. If you find a coding-tag spec by ignoring all zero bytes at odd byte indexes, it means that the file is utf-16le whatever the tag value is. Does Emacs already implement these heuristics? But, those are anyway just heuristics; not 100% reliable. So I think we need a user option to turn it on and off, or perhaps a user option to select which kind of heuristics. Should we install this option now?