Bug 379050 - Umlauts and accented characters in IPTC metadata not correct
Summary: Umlauts and accented characters in IPTC metadata not correct
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Iptc (show other bugs)
Version: 5.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-21 17:30 UTC by ulrich.demlehner
Modified: 2020-08-28 05:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0


Attachments
Screenshot with wrong display of accented character in IPTC metadata (12.35 KB, image/png)
2017-04-21 17:30 UTC, ulrich.demlehner
Details
Screenshot with correct display of accented characters in XMP metadata of same file (11.76 KB, image/png)
2017-04-21 17:31 UTC, ulrich.demlehner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulrich.demlehner 2017-04-21 17:30:13 UTC
Created attachment 105136 [details]
Screenshot with wrong display of accented character in IPTC metadata

When I add pictures to DigiKAM by creating a new album from a subdirectory with pictures I see that umlauts (e.g. German ä, ö, ü) and accented characters (e.g. French é) which are used in IPTC metadata are not correctly displayed in DigiKAM. Please refer to the attached Clipboard03.png for an example. Those characters are correctly displayed if the are used in the XMP metadata of the same file (refer to Clipboard04.png for an example).

Thanks for your support!

Ulrich
Comment 1 ulrich.demlehner 2017-04-21 17:31:19 UTC
Created attachment 105137 [details]
Screenshot with correct display of accented characters in XMP metadata of same file
Comment 2 Eric Bayard 2019-02-23 10:38:40 UTC
Actually this issue is related/has been reproted several times  ex:
issues number 195508, 370558, 379050, 379581
Comment 3 caulier.gilles 2020-08-28 05:26:21 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.
Related: bug 379581
FIXED-IN: 7.1.0

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

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