Bug #571

Need to convert character set when writing XMP sidecar

Added by Andreas Huggel about 12 years ago. Updated over 10 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


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)


canon_powershot_1000.exv (5.06 KB) canon_powershot_1000.exv Redmine Admin, 19 Sep 2008 03:05

Associated revisions

Revision 1908 (diff)
Added by Andreas Huggel almost 11 years ago

#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)

Revision 1975 (diff)
Added by Andreas Huggel over 10 years ago

#571: Add Iptc.Envelope.CharacterSet only if any other dataset is added, fixed tests.



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.


Updated by Andreas Huggel almost 11 years ago

  • Status changed from New to Resolved
  • Target version set to 0.19
  • % Done changed from 0 to 100

r1908 adds UTF-8 charset detection logic and charset conversion.


Updated by Andreas Huggel over 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF