Bug #863
Unicode issue writing to XMP sidecar
100%
Description
Writing dc.title or dc.description to an XMP sidecar file destroys non-ASCII characters.
This was originally reported for digikam writing to an XMP sidecar file using the library: https://bugs.kde.org/show_bug.cgi?id=304187
It is reproducible using the attached, prepared image file and the exiv2 command line utility:
Execute
exiv2 -eX empty-file.jpg
Inspect the two files:
exiv2 -p x empty-file.jpg
Xmp.dc.title LangAlt 1 lang="x-default" UnicoƉe
Xmp.dc.description LangAlt 1 lang="x-default" UnicoƉe
exiv2 -p x empty-file.xmp
Xmp.dc.title LangAlt 1 lang="x-default" Unico?e
Xmp.dc.description LangAlt 1 lang="x-default" Unico?e
Hexeditor confirms that the two-byte code 0xC689 becomes 0x3F, which is the question mark, in the file, indicating that a conversion process prior to writing the file fails, it's not a matter of reading or of display in the terminal.
Files
History
Updated by Alan Pater over 6 years ago
- File 883.exiv2.jpg 883.exiv2.jpg added
- Category set to xmp
- Status changed from New to Resolved
I cannot reproduce this issue with a new test image that has had Title and Caption added by digikam 4.8.0 / exiv2 0.24.
~$ exiv2 -p x 883.exiv2.xmp Xmp.dc.title LangAlt 1 lang="x-default" UnicoƉe Xmp.dc.description LangAlt 1 lang="x-default" UnicoƉe