From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Unicode handling breaks Jpeg image detection? Date: Wed, 25 Jun 2008 11:48:34 +0900 Message-ID: References: <87od5qbn0b.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1214362137 792 80.91.229.12 (25 Jun 2008 02:48:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2008 02:48:57 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 25 04:49:42 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 1KBL4i-0004HL-LE for ged-emacs-devel@m.gmane.org; Wed, 25 Jun 2008 04:49:36 +0200 Original-Received: from localhost ([127.0.0.1]:38082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBL3t-0005Ec-5G for ged-emacs-devel@m.gmane.org; Tue, 24 Jun 2008 22:48:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBL3o-0005EA-S9 for emacs-devel@gnu.org; Tue, 24 Jun 2008 22:48:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBL3m-0005Dh-6U for emacs-devel@gnu.org; Tue, 24 Jun 2008 22:48:39 -0400 Original-Received: from [199.232.76.173] (port=39596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBL3m-0005Dc-1o for emacs-devel@gnu.org; Tue, 24 Jun 2008 22:48:38 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:49490) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KBL3l-00050R-7X for emacs-devel@gnu.org; Tue, 24 Jun 2008 22:48:37 -0400 Original-Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id m5P2nbM2011875; Wed, 25 Jun 2008 11:49:37 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id m5P2mYkw023737; Wed, 25 Jun 2008 11:48:34 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp4.aist.go.jp with ESMTP id m5P2mYhF016968; Wed, 25 Jun 2008 11:48:34 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1KBL3i-00070z-0B; Wed, 25 Jun 2008 11:48:34 +0900 In-reply-to: <87od5qbn0b.fsf@stupidchicken.com> (message from Chong Yidong on Tue, 24 Jun 2008 16:23:32 -0400) 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 9 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:99885 Archived-At: In article <87od5qbn0b.fsf@stupidchicken.com>, Chong Yidong writes: > In Emacs 23, jpeg content autodetection seems to be broken. I think > this may be an encoding issue. To see this, rename any jpeg image from > foo.jpg to foo.JPG (to turn off file-name detection), and open it in > Emacs. Emacs 23 fails to detect the image, while Emacs 22 works. > In a buffer containing the exact same jpeg data, do > M-: (string-match "\\`\xff\xd8" (buffer-string)) RET > This gives 0 in Emacs 22, and nil in Emacs 23. This is the check that > makes image-type-header-regexps and image-jpeg-p fail for Emacs 23. I've just installed a fix. --- Kenichi Handa handa@ni.aist.go.jp