From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel,gmane.emacs.w3m Subject: Re: detect-coding-with-priority Date: Fri, 11 Jan 2008 18:59:05 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-2022-JP X-Trace: ger.gmane.org 1200045583 1640 80.91.229.12 (11 Jan 2008 09:59:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 11 Jan 2008 09:59:43 +0000 (UTC) Cc: emacs-w3m@namazu.org, emacs-devel@gnu.org To: Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 11 11:00:05 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JDGgG-0003eF-VG for ged-emacs-devel@m.gmane.org; Fri, 11 Jan 2008 11:00:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JDGfs-0000Vb-Tk for ged-emacs-devel@m.gmane.org; Fri, 11 Jan 2008 04:59:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JDGfb-0000E4-CJ for emacs-devel@gnu.org; Fri, 11 Jan 2008 04:59:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JDGfZ-0000C2-U3 for emacs-devel@gnu.org; Fri, 11 Jan 2008 04:59:22 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JDGfZ-0000Bo-IZ for emacs-devel@gnu.org; Fri, 11 Jan 2008 04:59:21 -0500 Original-Received: from mx1.aist.go.jp ([150.29.246.133]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JDGfY-0004wd-KZ for emacs-devel@gnu.org; Fri, 11 Jan 2008 04:59:21 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m0B9xB8x001041; Fri, 11 Jan 2008 18:59:11 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m0B9xATJ013293; Fri, 11 Jan 2008 18:59:10 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id m0B9x5aC010388; Fri, 11 Jan 2008 18:59:05 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.68) (envelope-from ) id 1JDGfJ-0003lT-4d; Fri, 11 Jan 2008 18:59:05 +0900 In-reply-to: (message from Katsumi Yamaoka on Fri, 11 Jan 2008 14:43:03 +0900) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:86732 gmane.emacs.w3m:7288 Archived-At: In article , Katsumi Yamaoka writes: > I noticed that `detect-coding-with-priority' doesn't work > recently in the Emacs trunk and Unicode-2, though I don't know > when it began. > (with-temp-buffer > (set-buffer-multibyte nil) > (insert (encode-coding-string "あいうえお" 'shift_jis)) > (detect-coding-with-priority (point-min) (point-max) > '((coding-category-sjis . shift_jis)))) >>> (raw-text no-conversion) I think the following change is the culprit. 2008-01-09 Kenichi Handa * coding.c (detect_coding_iso2022): New arg latin_extra_code_state. Allow Latin extra codes only when *latin_extra_code_state is nonzero. (detect_coding_mask): If there is a NULL byte, detect the encoding as UTF-16 or binary. If Latin extra codes exist, detect the encoding as ISO-2022 only when there's no other proper encoding is found. I'm now investigating what's wrong. --- Kenichi Handa handa@ni.aist.go.jp