punctuation in photo metadata

Started by Megabyte, October 03, 2019, 09:07:34 AM

Previous topic - Next topic

Megabyte

This is not strictly an ExifTool question. I have just spent a couple of hours trying to figure out rules for punctuation in the keywords field and PersonInImage filed. I have looked at many different metadata resources and I can't find an answer. I would be very grateful if someone here knows the answer or can point me to a resource.
Hyphens: if a name or keyword has a hyphen, what is the 'danger' of including it in the name or keyword? I have tested and they do appear correctly in several applications including ExifTool GUI.
Periods: For a name - middle initial followed by a period or Jr. / Sr.  Yes, I realize one could spell it out entirely.
Apostrophes: My client just gave me a keywords list that included- Swimmer's dock., and President's Dinner.
Thank you.

Hayo Baan

These should not pose any problem whatsoever. The only reason some punctuation may cause issues is when they are used as delimiter between separate keywords. E.g. on the exiftool command line (where this can be solved by choosing a different one using the -sep option). Other software may use other delimiters.
Hayo Baan – Photography
Web: www.hayobaan.nl

StarGeek

It's important to remember that delimiters are a function of the interface used to read/write the keywords.  Internally, each keyword is fully self contained and is already completely separated from other keywords.  You can use any character you want in a keyword, including Line Feeds and Carriage Returns.  It would be a bad idea to do so, of course, but it's possible.  I've seen it, and man, it was tough to try to delete that when I was first learning to use exiftool.  You could include the entire text of the Magna Carta or the Declaration of Independence as a single keyword if you wanted to.

It can help to look at the raw data with regards to keywords.  Here's an example, which you can view if you use -b -xmp on a file that has XMP:Subject keywords:
<rdf:Description rdf:about=''
  xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <dc:subject>
   <rdf:Bag>
    <rdf:li>keyword 1</rdf:li>
    <rdf:li>Keywood with
Line Feed</rdf:li>
    <rdf:li>Keyword-2</rdf:li>
   </rdf:Bag>
  </dc:subject>
</rdf:Description>


As you can see, each keyword is contained within the <rdf:li>...</rdf:li> structure.

Now, some badly written programs may read keywords improperly.  As an example, the old Google Picasa program would separate any keyword with a comma in it as separate keywords.  "Smith, John" would end up with "Smith" and "John" as separate keywords.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).