I am in the process of embedding the names of branded products in the "Title" field XMP-dc
I am encountering difficulties with certain characters.
™ - Trademark character is handled with no problem
® - Registered Trademark character becomes "¬Æ" when inserted into the metadata field of a PDF file.
Is there a way to handle this with proper encoding, and this is the only character that I have noticed, are there others I need to watch out for?
Here is an example of my write command.
exiftool -v4 -overwrite_original_in_place -Title="BIG BRAND® Widgets 14-980-001" -myxmpDocumentType="Main" -myxmpProductNumber="208" "/Volumes/dam/United States/Product Assets/Big Brand/Big Brand Product Guide-12222.pdf"
On a Mac:
> exiftool a.pdf -pdf:title=®
1 image files updated
> exiftool a.pdf -pdf:title
Title : ®
So I suspect the problem is the specifics of your system.
See FAQ 10 and 18 (https://exiftool.org/faq.html#Q10) for help with character encoding problems.
- Phil
Hmm...
Thanks for putting me on the right path.
Gentle readers
Sure enough, Phil was right again.
I was using an AppleScript as the environment to build the repeat loop and logic to feed the shell commands.
When I read from the data file (UTF-8 with CR) I was calling:
-- read from fileRef before returnChar
This was reading it in as AppleScript text.
I changed it to
-- read from fileRef before returnChar as «class utf8»
This preserves the encoding as long as you don't do any modification or concatenation with AppleScript strings without defining the class every time.