Category: Bugs nobody else but crazy StarGeek would find
In my config file, I have the following shortcut definition:
MyDesc => ['Description','Caption-Abstract'],
It allows me to read and write to both Description and Caption-Abstract at the same time.
I also have a short Autoit3 script that replaces characters that are hard to deal on the command line in Windows, such as double quotes ", new lines, etc with their HTML entities. I then use the -E option (https://exiftool.org/exiftool_pod.html#E--ex--escapeHTML--escapeXML) to write the data. Me, being the lazy sort, grabbed a Autoit 3 UDF (User Defined Functions) to deal with the conversion. I noticed right away that there was a problem with it. When encoding something, it would double encode the ampersand. So a double quote " would turn into ". Obviously incorrect. But when I used a command like this:
exiftool -E -MyDesc=""Some text"" FILE
It worked out fine, saving "Some text" to the file, so I didn't worry about it.
Today, I figured out that it only works in the case of the short cut. Directly writing to the individual tags would end up with "Some text".
Example:
C:\>exiftool -P -overwrite_original -E -Mydesc=""Some text"" y:\!temp\Test3.jpg
1 image files updated
C:\>exiftool -g1 -a -s -Description y:\!temp\Test3.jpg
---- XMP-dc ----
Description : "Some text"
C:\>exiftool -P -overwrite_original -E -Description=""Some text"" y:\!temp\Test3.jpg
1 image files updated
C:\>exiftool -g1 -a -s -Description y:\!temp\Test3.jpg
---- XMP-dc ----
Description : "Some text"
I love it when you find subtle bugs. :)
It may be a couple of days before I can read this in detail (long weekend here).
- Phil
It's all good. I already fixed my autoit script and it's not likely to affect anyone else.
Just a bump to see if you found time to look for this bug.
Thanks for the reminder! -- I had lost track of this one.
And thanks for the bug report!
This will be fixed in 11.16
- Phil
Edit: ExifTool 11.16 is now available