all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Unicode handling breaks Jpeg image detection?
@ 2008-06-24 20:23 Chong Yidong
  2008-06-25  2:48 ` Kenichi Handa
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2008-06-24 20:23 UTC (permalink / raw)
  To: emacs-devel

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.

Could someone try to fix this?




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-04  8:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-24 20:23 Unicode handling breaks Jpeg image detection? Chong Yidong
2008-06-25  2:48 ` Kenichi Handa
2008-06-25 12:37   ` Stephen Berman
2008-07-04  7:20     ` Kenichi Handa
2008-07-04  8:40       ` Stephen Berman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.