From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: coding tags and utf-16 Date: Thu, 05 Jan 2006 10:56:52 -0500 Message-ID: References: <20051221.090033.182620434.wl@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1136484509 26426 80.91.229.2 (5 Jan 2006 18:08:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2006 18:08:29 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 19:08:28 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 1EuZWz-0001eJ-AP for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 19:08:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuZYi-00070x-M6 for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2006 13:09:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EuXVy-0007EG-Ja for emacs-devel@gnu.org; Thu, 05 Jan 2006 10:58:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EuXVw-0007Cw-7i for emacs-devel@gnu.org; Thu, 05 Jan 2006 10:58:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EuXVv-0007Cd-3B for emacs-devel@gnu.org; Thu, 05 Jan 2006 10:58:55 -0500 Original-Received: from [206.47.199.141] (helo=simmts12-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EuXXG-00088m-MJ; Thu, 05 Jan 2006 11:00:18 -0500 Original-Received: from empanada.home ([67.71.26.159]) by simmts12-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060105155650.BZDT29039.simmts12-srv.bellnexxia.net@empanada.home>; Thu, 5 Jan 2006 10:56:50 -0500 Original-Received: by empanada.home (Postfix, from userid 502) id 1205D6A4706; Thu, 5 Jan 2006 10:56:52 -0500 (EST) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Wed, 04 Jan 2006 15:42:23 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) X-Originating-IP: [0] 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:48751 Archived-At: > So, in any cases, a tag value itself is useless. Then how > to detect utf-16 more reliably? In the current Emacs > (i.e. Ver.22), I think we can use auto-coding-regexp-alist > or auto-coding-alist. In the former case, we can register > BOM patterns and also something like "\\`\\(\0[\0-\177]\\)+" > for utf-16be. In the latter case, you can use more > complicated heuristics in a registered function. Can't it be somehow added to detect_coding_utf_16? > 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. Shouldn't this be done via the coding-system-priority? Stefan