Bug 155733 - Make it possible to write/read unicode (or UTF-8) in IPTC metadata.
Summary: Make it possible to write/read unicode (or UTF-8) in IPTC metadata.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Iptc (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-14 11:04 UTC by Johan Eneland
Modified: 2020-08-28 07:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Eneland 2008-01-14 11:04:05 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages

In MaPiVi (http://mapivi.sourceforge.net/mapivi.shtml) it is possible to add non ascii-characters 
(for ex åäöÅÄÖ),  and it is still right characters when open IPTC for editing again.
So it is proven that at least the Swedish caracters can be written and read to/from a jpeg-file without being changed.

I also tested:
Linux>  exiv2 -pi testIPTC.jpg   # with the terminal character encoding=ISO-8859-1 (Western) 
which gave correct Swedish characters.
(Probably the encoding when written was the same (ISO-8859-1) I guess. )

It would be greate if it was unicode at both write and read. 
 If doing man exif2 unicode is mentioned so it is probably possible to use it.
 Linux>  man exif2 => .... "The  format of Exif Comment values includes an optional charset specifica‐
              tion at the beginning:  [charset=Ascii|Jis|Unicode|Undefined ]comment"...
Comment 1 Andreas Huggel 2008-01-14 16:12:10 UTC
Unfortunately, the quote from the exiv2 man page applies only to the Exif user comment tag. It does not apply to IPTC datasets.

(This issue looks like a duplicate of bug #132244.)

Andreas
Comment 2 caulier.gilles 2008-01-14 16:22:12 UTC
Right Andreas...

Fixed.

Gilles

*** This bug has been marked as a duplicate of 132244 ***
Comment 3 caulier.gilles 2020-08-28 07:37:44 UTC
Git commit ad0ab9efeba6e2fe3bb86207a91499e4e8eb170f by Gilles Caulier.
Committed on 28/08/2020 at 05:19.
Pushed by cgilles into branch 'master'.

IPTC and Utf8 support: If a tag is string, check if global IPTC characterset is null to convert in latin1, else we expect to interpret the string as utf8.
We use std::string accessor from Exiv2 to get an Utf8 cenversion of string. If it do not work, well this problem need to be reported as UPSTREAM
to Exiv2 as pre-cenversion of string is not done in background by the library.
This patch prevent to display latin1 string with a wrong Utf8 conversion which can break some characters.
BUGS: 379581
BUGS: 379050
FIXED-IN: 7.1.0

M  +27   -3    core/libs/metadataengine/engine/metaengine_iptc.cpp

https://invent.kde.org/graphics/digikam/commit/ad0ab9efeba6e2fe3bb86207a91499e4e8eb170f