How to write Latin1-encoded IPTC-values?

Started by van Dusen, May 31, 2011, 11:24:55 AM

Previous topic - Next topic

van Dusen

Concerns ExifTool.exe v8.57 on WinXP Pro SP3

As far as my experience goes, IPTC tags will be written always UTF8-encoded. Is there still any way to store values of IPTC tags Latin1 encoded?

According the ExifTool documentation you can do the following:

QuoteThe following command changes the internal IPTC encoding to UTF-8:
   exiftool -tagsfromfile @ -iptc:all -codedcharacterset=utf8 {File.jpg}
and this command changes it back from UTF-8 to Windows Latin1 (cp1252):
   exiftool -tagsfromfile @ -iptc:all -codedcharacterset=  {File.jpg}
or this command changes it back from UTF-8 to Windows Latin2 (cp1250):
   exiftool -tagsfromfile @ -iptc:all -codedcharacterset= -charset iptc=latin2  {File.jpg}


Unfortunately, I can't reproduce this, when I try the following:

0. Initial:

IPTC:CodedCharacterSet ... utf8
IPTC:{TagName} ........... Umlaute äöüß
..................(Binary: Umlaute äöüß)



1. Execute: ExifTool -tagsFromFile @ -IPTC:All -CodedCharacterSet= {Image file}

Expected result:
IPTC:CodedCharacterSet ... {n.a.}
IPTC:{TagName} ........... Umlaute äöüß
..................(Binary: Umlaute äöüß)


Actual result:
IPTC:CodedCharacterSet ... {n.a.}
IPTC:{TagName} ........... Umlaute äöüß
..................(Binary: Umlaute äöüß)


Why stays IPTC:{TagName} UTF8 encoded and isn't converted to Latin1?


2. Execute: ExifTool -tagsFromFile @ -IPTC:All -CodedCharacterSet=utf8 {Image file}

Converting back to UTF8 will change apparently nothing.
Actual result:
IPTC:CodedCharacterSet ... utf8
IPTC:{TagName} ........... Umlaute äöüß
..................(Binary: Umlaute äöüß)



And just out of curiosity:

3. Execute: ExifTool -IPTC:CodedCharacterSet= {Image file}

Actual result:
IPTC:CodedCharacterSet ... {n.a.}
IPTC:{TagName} ........... Umlaute äöüß
..................(Binary: Umlaute äöüß)


Apparently it is a bad idea just to delete the IPTC:CodedCharacterSet tag...

Thanks a lot in advance,
greetings, van Dusen


Phil Harvey

You can write IPTC in whatever encoding you like.

I think that reading FAQs number 10 and 18 may help explain this.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

van Dusen

Hello Phil,

thanks for your quick reply. It was indeed my fault, actually everything works as it should. I had validated the results by extracting the tags using the "-b(inary)" option and I didn't reckon, that a charset conversion is done (here: output had been converted to UTF8 in each case) even if the "-b" option is set (at least for tags other than "Binary" type, I assume). I found, that option "-v4"/"-v5" is better suited for validation purposes.