Author Topic: Headline field odd characters  (Read 72 times)

ajh13300

  • Newbie
  • *
  • Posts: 2
Headline field odd characters
« on: November 08, 2018, 04:39:42 PM »
I have a written a script on Mac Sierra 10.12.x that calls v11.7 of exiftool. The script writes the same text into both the Headline and Description fields (and in some cases Artist). However, many characters don't work correctly in Headline such as non-stick quotes, long dashes and anything with a diacritical. The same characters work fine in the Description and other field. Here's the syntax I'm using (in this example with a simple photo credit, all of the fields contain the same text except for a set of parens:

Code: [Select]
/usr/local/bin/exiftool -Photoshop:CopyrightFlag=True -URL= -Artist='this is” the — caption' -Title='MyTitleHere' -Description='(this is” the — caption)' -Headline='(this is” the — caption)' '/Desktop/test_photos/URWIN_FLOWERS_95.jpg' -overwrite_original
In the screen grabs, you can see the difference. The Headline field has odd characters.
Thanks!

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2036
Re: Headline field odd characters
« Reply #1 on: November 08, 2018, 05:53:55 PM »
By default, Headline will be written to IPTC (see second paragraph under the -TAG option).  You probably want to write specifically to XMP with XMP:Headline
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

ajh13300

  • Newbie
  • *
  • Posts: 2
Re: Headline field odd characters
« Reply #2 on: November 09, 2018, 11:45:27 AM »
That's a good suggestion. Thanks. And that field does appear to not mangle these characters. However, the downstream system isn't looking for the data in that headline field.

HOWEVER, in the meantime, I did several dumps of the data using exiftool and the data actually looked ok. Then I sent the photos to the downstream system and it read the characters just fine even though it looked bizarre in the desktop applications. So, all's well that ends well.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2036
Re: Headline field odd characters
« Reply #3 on: November 09, 2018, 12:37:26 PM »
However, the downstream system isn't looking for the data in that headline field.

The reason I suggested using XMP:Headline is because you were already using Description, which is also an XMP tag.  It seems really odd that it wouldn't read Headline from the XMP group as well.

You might also try adding -iptc:codedcharacterset=utf8 to the command to ensure that the Headline is decoded correctly.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.