Closed Arczt closed 3 years ago
That really shouldn't be happening. I've just tried it on Linux and there isn't a problem.
Did it successfully read metadata from the photo_with_é.jpg
file? If so, then there's only a problem with writing files. (It tries to create a .xmp file if it failed to write to the .jpg file.)
I'll do some tests on Windows and report back later.
OK, I've recreated the problem. I think it might be related to this https://dev.exiv2.org/boards/3/topics/1926 which is also using the MSYS2 build of exiv2.
See also https://dev.exiv2.org/boards/3/topics/2944
I get the feeling the exiv2 project might not fix this, and I don't think there's anything I can sensibly do in Photini (copy file to a temporary safe name?, rename the file?).
Hmm. I just tried running the mingw64.exe
shell that's part of MSYS2 as installed by the Photini installer and then using exiv2
directly:
$ exiv2 -pa "C:\Users\Jim\Pictures\fünny_name.JPG"
Error: Directory Canon with 6144 entries considered invalid; not read.
Exif.Image.ProcessingSoftware Ascii 26 Photini editor v2020.10.0
Exif.Image.ImageDescription Ascii 78 Château-Gontier, France
Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 25 Canon PowerShot A1100 IS
Exif.Image.Orientation Short 1 top, left
...
More investigation needed.
Exiv2 and MSYS2 appear to have done what's needed: https://github.com/msys2/MINGW-packages/pull/2837
My next thought was maybe gexiv2 on MSYS is failing. GIMP uses gexiv2, so I installed it and used it to open fünny_name.JPG
and export it to another file. It copied the metadata correctly, so the problem probably isn't in gexiv2.
A short test script shows the problem:
import sys
import gi
gi.require_version('GExiv2', '0.10')
from gi.repository import GExiv2
def main():
for path in sys.argv[1:]:
print(path)
md = GExiv2.Metadata()
md.open_path(path)
print(md.get_exif_tags())
return 0
if __name__ == "__main__":
sys.exit(main())
GIMP have also had problems: https://gitlab.gnome.org/GNOME/gimp/-/issues/1350
I've sought help from the MSYS2 project: https://github.com/msys2/MINGW-packages/issues/7167
And now from the GExiv2 project: https://gitlab.gnome.org/GNOME/gexiv2/-/issues/59
This doesn't work if the folder has accents in its name!
I think I have the best compromise solution now.
Released in version 2020.10.0 and after.
I tried with my tests files, and it works fine !
Hello, When I try to save a photo after modifying metadata, I have this error message :
There is a accent the the file name. When removing it (photo_with_é.jpg => photo_with_e.jpg), everything works fine. Same issue with other non ascii characters. (And congratulations for the great job !)