ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: ake on August 05, 2010, 03:29:21 PM

Title: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 05, 2010, 03:29:21 PM
Hello,
I'm having problem with non ASCII charaters in clipping path names. A clipping path named 'Pfadé åäö 1' comes out like: 'Pfad? ??? 1'.
ake-g4:~ ake$ /usr/bin/exiftool -s -Photoshop:ClippingPathName /Users/ake/Desktop/test_image.jpg
ClippingPathName                : Pfad? ??? 1
ake-g4:~ ake$ /usr/bin/exiftool -s -Photoshop:ClippingPathName /Users/ake/Desktop/test_image.jpg|cat -vet
ClippingPathName                : PfadM-^N M-^LM-^JM-^Z 1$


I'm using Mac OS X 10.5.8 and exiftool version 8.27.

-Åke
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 06, 2010, 08:22:25 AM
Hi Åke,

Yes, this is a problem. :(

With your image the clipping path name seems to be encoded in Macintosh Roman.  I could easily decode this when extracting with exiftool if this was always the case.  However, reading the old version of the Photoshop file format specification I have, I can't find any mention of the character encoding used.  I suspect that the local system encoding is being used, and that the string would be different if you did this in Windows.  This sort of problem is unfortunately common across other types of metadata as well.

If I knew the encoding, I could decode it properly.  Read FAQ number 10 for a discussion of special character handling.

I would be more than happy to change this in exiftool if you could come up with some way of determining the encoding, or if by some stroke of luck the Windows version of Photoshop uses Macintosh Roman encoding too (unlikely, but I can't test this).

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 11, 2010, 06:15:28 AM
Hi again,

After some more investigations it seems like the output has MacRoman encoding (http://en.wikipedia.org/wiki/MacRoman) but using "-charset MacRoman" doesn't make the output right. I changed the clipping path name to 'Pfad å ä ö 1 é' so that I got more characters to look for.
$ /usr/bin/exiftool -s -S  -Photoshop:ClippingPathName -charset MacRoman /Users/ake/Desktop/testbilder/test_2.psd
Pfad ? ? ? 1 ?
$ /usr/bin/exiftool -s -S  -Photoshop:ClippingPathName -charset MacRoman /Users/ake/Desktop/testbilder/test_2.psd |od -cx
0000000    P   f   a   d     214     212     232       1     216  \n   
           6650    6461    8c20    8a20    9a20    3120    8e20    000


Can you please advice me in how to make it work?

-Åke
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 11, 2010, 07:31:32 AM
Do you have access to Photoshop on a Windows machine?  If the Windows version uses Mac Roman (unlikely), or if we can find a way to determine the encoding, then I can decode it in ExifTool.  But I suspect that Photoshop probably just uses the local encoding without storing the encoding method in the file.

The -charset option won't help you unless I add a -charset photoshop=CHARSET feature, which is the only option if we can't determine the encoding otherwise.

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 12, 2010, 04:45:32 AM
Created an image with a clipping path named 'Bana å ä ö é 1' in Photoshop CS5 on a PC with XP. It seems to store the clipping path in ISO 8859-1. Opening it in Mac Photoshop CS3 the clipping path is named 'Bana  ‰ ˆ È 1'. So it look like that Photoshop doesn't store the clipping path encoding.
I kindly ask you to add the feature -charset photoshop=CHARSET.

Regards, Åke
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 12, 2010, 07:20:38 AM
Hi Åke,

Thanks for running this test.

Could you possibly send me the sample from Windows so I can take a look (either attach it to a post here or email it to philharvey66 at gmail.com).  If I can't find the encoding stored anywhere I will add the -charset photoshop= option.

Thanks.

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 12, 2010, 11:07:50 AM
I attached the images.

- Åke
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 12, 2010, 12:50:57 PM
Thanks Åke,

I compared these files and couldn't find any obvious way to determine the encoding, so I will add the -charset photoshop= option to the next release.

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 12, 2010, 01:13:45 PM
Haha!  I just opened your Windows-generated PSD file in Photoshop CS4 for Mac, and the path name displays incorrectly!  This more-or-less proves that the character encoding isn't stored as it should be in these files.

So this should really be an Adobe Photoshop bug report, not an ExifTool bug report. :)

But the new option should allow you to work around this Adobe bug.

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 13, 2010, 01:39:11 AM
Thanks for your efforts and solving the problem. I'm looking forward to the next release  :)

- Åke
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: Phil Harvey on August 14, 2010, 07:28:19 AM
There you go.  8.28 has just been released. :)

I set the default charset to 'Latin', so the Windows file should work without any additional options, but the Mac file will require -charset photoshop=macroman (or mac or roman, which are both aliases for macroman).

- Phil
Title: Re: Problem with output from Photoshop:ClippingPathName
Post by: ake on August 16, 2010, 04:13:48 PM
Thank you for your help, it works like a Swiss clock    ;D

-Åke