Bug #571

Need to convert character set when writing XMP sidecar

Added by Andreas Huggel over 9 years ago. Updated about 8 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:0.19


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) Redmine Admin, 19 Sep 2008 03:05

Associated revisions

Revision 1908
Added by Andreas Huggel over 8 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
Added by Andreas Huggel about 8 years ago

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


#1 Updated by Andreas Huggel over 9 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.

#3 Updated by Andreas Huggel over 8 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.

#4 Updated by Andreas Huggel about 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux