New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPTC tags with special characters such as ø, ç, õ, etc... #1203
Comments
Thanks for raising this issue. I've never thought about this. In March, I investigated (and solved) using Unicode on Exif.Photo.UserComment. I'll dig around in the code this week-end and update you. For sure, I should add something to the man page about this. |
I've investigated. I don't know the purpose of the In
So the data is passed from the command-line into the IPTC data block as binary without being modified. I maintain Exiv2 on macOS and I believe the terminal is UTF-8. So, your command-lines work OK.
The answers to your questions are:
So what does -n/--encoding do? It's used internally in the exiv2 command-line parser to define the encoding. Andreas (Huggel) wrote exiv2. He is a very good engineer and probably had an intention to encode all command-line "String" definitions. However, it hasn't been implemented I've documented using UNICODE for Exif.Photo.UserComment, Exif.GPSInfo.GPSProcessingMethod and Exif.GPSInfo.GPSAreaInformation for Exiv2 v0.27.3 (scheduled on 2020-06-30).
We could consider implementing |
Thanks so much for your investigation. In notepad replace the special character with unicode, so for é replace with /u00E9. Then save the notepad .bat file with ANSI encoding (not UTF8). Then run the commands and the correct character is entered into the tags. I am happy that I have got it working this way. I prepare the tags in excel so it's easy to program the find and replace. If the character replacement can be avoided in future versions of EXIV2 then it would certainly make it 'cleaner'. Kind regards Mark |
I'm very happy that you have this working. Being a native English speaker, I am out of my comfort zone when discussing any encoding except ascii! One of my favourite users (@tester0077) has been asking me to support character set encodings "properly". The biggest puzzle for me is to understand what is wanted and/or expected. Anyway, thanks for closing this bug. I'm about 96% of the way to Exiv2 v0.27.3 and very happy to see this resolved. |
I use exiv2 to tag multiple images in batch. When the tags contain special characters, after running the batch, the special characters in the tags are not saved correctly.
The batch command for 2 sample images;
exiv2 -M"set Iptc.Application2.Caption String "F-OJSE Airbus A330-202 510 AirCalin - Air Calédonie International"" D:\Temp\20B0004.jpg
exiv2 -M"set Iptc.Application2.Caption String "PR-RDD Gulfstream G550 5280 Yamandu Empreendimentos e Participações SA"" D:\Temp\20B0037.jpg
I have used a workaround as below but this is now also causing issues.
exiv2 -M"set Iptc.Application2.Caption String "F-OJSE Airbus A330-202 510 AirCalin - Air Cal\u00E9donie International"" D:\Temp\20B0004.jpg
exiv2 -M"set Iptc.Application2.Caption String "PR-RDD Gulfstream G550 5280 Yamandu Empreendimentos e Participa\u00E7\u00F5es SA"" D:\Temp\20B0037.jpg
Using exiftool, I can specify the character set as Latin as in below, and this allows the special character to be correctly written and subsequently displayed:
exiftool -charset latin
There is mention in the EXIV2 documentation about "-n" but I cannot seem to locate any samples of this or how to incorporate this encoding in the above command lines.
If someone is able to assist then it will be greatly appreciated.
The text was updated successfully, but these errors were encountered: