-listx emits duplicate tag names (with different case)

Started by Mac2, May 22, 2014, 05:36:20 AM

Previous topic - Next topic

Mac2

I don't know if this is a bug or intentional:

When I dump all tags known to ExifTool with a command line like:

exiftool -f -t -l -listx -use MWG

Some groups emit duplicate tags which differ only by the upper/lower case in the id. For example:

<table name='DjVu::Meta' g0='DjVu' g1='DjVu-Meta' g2='Image'>

contains

<tag id='author' name='Author' type='?' writable='false' g2='Author'>
<tag id='Author' name='Author' type='?' writable='false' g2='Author'>

or

DjVu::Meta\Title\Title\0 and DjVu::Meta\title\Title\0

There are similar duplicates for other groups as well, e.g.

Kodak::DcMD\CMbo\CameraByteOrder\0
and Kodak::DcMD\cMbo\CameraByteOrder\0
QuickTime::HintTrackInfo\tpaY\TotalBytesNoRTPHeaders\0 and QuickTime::HintTrackInfo\tpay\TotalBytesNoRTPHeaders\0


This causes some issues when my application caches tag names in a database and with the same data ending up in different buckets...


Phil Harvey

In general, tag ID's are case sensitive.  If the originating software isn't consistent with its tag ID's, then this may be reflected in the ExifTool tag information database.  There isn't anything I can do about 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 ($).

Mac2

Hi, Phil

I thought you 'make up' the names you use for tags in ExifTool and thus were in control about the exact spelling?

Phil Harvey

The tag names, yes.  The tag ID's, no.  Big difference.

The tag names are what you use in ExifTool commands.  The ID's are what is stored in the file.

- 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 ($).

Mac2

Ah, important info.

Currently I use group id, tag id, tag name and tag index as a unique key to address a specific tag. When the case of the id changes, my software detects that and "folds" the data stored for the old tag key into the new tag key and from then on uses the new key to match the installed ExifTool release.

I just wondered why the same key showed up (with different case) in one group, or why the case of the key (id) sometimes changes between ExifTool releases. When a new ExifTool version ships I update my database by importing the -listx output and thus noticed the differences.

Phil Harvey

You may sometimes find the case of a tag name changes between releases, but tag names are not case sensitive, so this shouldn't be a problem (if it is a problem for you, then it may be smart to make them case insensitive in your database too).  It should be very rare to have a tag ID change case (although certainly I may add a new tag ID with a different case if I discover that some application writes it this way).

- 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 ($).

Mac2

Thanks for the detailed info! I will consider this.