identify does not correctly detect exif encoding

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
suweller

identify does not correctly detect exif encoding

Post by suweller »

I have the following version of identify:

Code: Select all

$ identify --version
Version: ImageMagick 6.5.1-0 2009-08-27 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
when I execute:

Code: Select all

$ identify -format "%[IPTC:2:25]" ~/Desktop/large_2010_4_430069-full.jpeg
Blume;Bl�te;Fr�hling;Sommer;Bl�tter
Just in case it will correctly display this in IE or windows browsers, special characters are replaced with a black "<?>" character

If someone wants to reproduce this, just download my avatar and run the identify command as mentioned above on it.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify does not correctly detect exif encoding

Post by magick »

Post a URL to your image. We tried your avatar but it has an EXIF profile but does not include an IPTC profile.
suweller

Re: identify does not correctly detect exif encoding

Post by suweller »

You are quite correct. I have uploaded the original image here.

Also, I should have named this topic 'identify does not correctly detect IPTC character encoding'

Thanks for the quick response.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify does not correctly detect exif encoding

Post by magick »

Can you be specific on when it is failing to display properly? We tried your command on on Linux box and the accent characters displayed properly.
suweller

Re: identify does not correctly detect exif encoding

Post by suweller »

That is strange... I ran the command on linux too...
I opened a gnome terminal on ubuntu 9.10, ran the command and it failed to display special characters.

What kind of linux box did you run it on?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: identify does not correctly detect exif encoding

Post by magick »

We're running CentOS 5.4.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: identify does not correctly detect exif encoding

Post by snibgo »

IM is emitting the strings as character set ISO-8859-1. They appear to be in the file as both ISO-8859-1 and Unicode. (I don't know where IM gets the data from.)

When I set a Ubuntu 9.04 terminal as character set ISO-8859-1, I get characters with umlauts.
snibgo's IM pages: im.snibgo.com
suweller

Re: identify does not correctly detect exif encoding

Post by suweller »

Hi,

Thank you for your help. It does seem to be terminal/system settings.

ImageMagick returns IPTC data as latin-1 but my system is set to utf8.
The code below displays the image IPTC data correctly.

Code: Select all

identify -format "%[IPTC:2:25]" ~/Desktop/large_2010_4_430069-full.jpeg | iconv -f latin1 -t utf8 -
Is this a problem of my system which should have a setting somewhere stating which encoding it uses or does ImageMagick simply ignore my terminal character encoding?
Post Reply