Page 1 of 1

Embedding Quotation Marks in IPTC

Posted: 2012-07-12T15:52:44-07:00
by arcking
Is there a way to embed quotation marks in the IPTC data of a TIFF image? I've been using the following command in a script

Code: Select all

convert $image +profile 8bim +comment -profile 8BIMTEXT:$iptc $image
along with a text file of the following format

Code: Select all

8BIM#1028="IPTC"
2#0="�"
2#120#Caption="Caption"
2#105#Headline="Headline"
2#55#Created Date="00000000"
2#115#Source="Source"
The problem is when the text I'd like to insert contains as quotation mark - ImageMagick assumes that the quotation mark indicates the end of the field. Is there any way to include a quotation mark in the iptc data? An escape character or something along that line?

Re: Embedding Quotation Marks in IPTC

Posted: 2012-07-12T18:17:34-07:00
by arcking
Problem solved. I'll include the following for other's reference.

" will create quotation marks in the iptc data

Or, if you're using PHP and need all characters that may cause issues replaced, look into using the htmlentities command.
http://us2.php.net/manual/en/function.htmlentities.php

Re: Embedding Quotation Marks in IPTC

Posted: 2012-07-22T15:04:56-07:00
by kalkulatorkredytowy
Cool stuff. Didn't know that """ does that. Thanks