Headline field odd characters

Started by ajh13300, November 08, 2018, 04:39:42 PM

Previous topic - Next topic

ajh13300

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:

/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

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
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

ajh13300

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

Quote from: ajh13300 on November 09, 2018, 11:45:27 AM
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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype