Need to convert character set when writing XMP sidecar
When I try to extract a XMP sidecar file from a photo with umlauts in IPTC fields, i get the following error:
C:\Programme\exiv2>exiv2 -eX P1010062.tif
XMP Toolkit error 4: Invalid UTF-8 sequence length
Error: Failed to encode XMP metadata.
(Reported by Franz Buchinger)
#571: Detect charset and convert to UTF-8 when converting IPTC to XMP; set Iptc.Envelope.CharacterSet when converting from XMP to IPTC. (Vladimir Nadvornik)
Updated by Andreas Huggel about 12 years ago
The character set of the data in IPTC is obviously not in ASCII and there is currently no logic implemented in exiv2 for a character set conversion to UTF-8 for the XMP sidecar. In addition, if the IPTC metadata is not encoded in ASCII it is usually not so clear what character set was used, so exiv2 could try to make a guess and the user would have to be able to provide the information in a new command line arg to the exiv2 tool, if the guess was wrong.