I use the python wrapper around the exiftool, like:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from exiftool import ExifToolHelper
images = ["skyblue.png"]
et = ExifToolHelper()
tag = 'XMP:Creator'
people = "Edwin, Juliëte, Sánder"
with ExifToolHelper() as et:
et.set_tags(
images,
tags={"XMP:Creator": people},
params=["-P", "-overwrite_original"]
)
d = et.get_metadata(images)
print('{0}:{1}'.format(tag, d
[o][tag]))
Output:
XMP:Creator:Edwin, Juli?te, S?nder
the output should be:
Output:
XMP:Creator:Edwin, Juliëte, Sánder
What do I have to change in my script to create this?
It looks like the Charset setting wasn't correct when the information was written. See FAQ 10 (https://exiftool.org/faq.html#Q10) for details.
- Phil
They are using PyExiftool, which is using -Stay_Open. Shouldn't writing data be unaffected by character coding when doing this?
@Eddy, if you are on Windows, then FAQ #18, problems with special characters on the Windows command line (https://exiftool.org/faq.html#Q18) might be applicable.
There are various places this could go wrong:
1. If the characters in the script aren't UTF-8
2. If the python wrapper is specifying another -charset for ExifTool
3. If whatever shell you are using to display the final result isn't using UTF-8
- Phil