Image-ExifTool - Re: UTF-8 -> Latin1 conversion, L option

Posted on Tue May 8 18:49:02 2007 by exiftool in response to 5088 (See the whole thread of 5)
Re: UTF-8 -> Latin1 conversion, L option
The encoding of existing information is not changed if you change CodedCharacterSet. However, it affects any new information added with ExifTool, and it also affects the way all IPTC information is decoded when reading.

If you want to use Latin1, probably the best thing to do is to delete the CodedCharacterSet tag. Most software will assume Latin1 if there is no CodedCharacterSet specified.

FYI: The proper way to use Latin1 in IPTC is actually very complex, and few software packages would understand it if done properly. (You need to use ISO 2022 and designate your choice to alternate graphics character sets to be Latin1 with the appropriate escape sequence in CodedCharacterSet, then invoke the desired character set with another ISO 2022 escape sequence in the actual text when you want to use it.)

But to answer your question, here is how you would change encoding to UTF8:

exiftool a.jpg -tagsfromfile a.jpg -iptc:all -codedcharacterset=UTF8

Unfortunately, due to a quirk in the way this is implemented in versions up to 6.89, this doesn't work when the CodedCharacterSet is deleted (although this is exactly what you want to do). So I have changed this, and uploaded a 6.90 pre-release which properly handles the translations when CodedCharacterSet is deleted. With this version, you can also translate the IPTC values back to Latin1 like this:

exiftool a.jpg -tagsfromfile a.jpg -iptc:all -codedcharacterset=

- Phil
Direct Responses: 5091 | 5092 | Write a response