Bug 507576 - Digikam User Comment Exif displaying incorrect characters for Nikon images.
Summary: Digikam User Comment Exif displaying incorrect characters for Nikon images.
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Exif (other bugs)
Version First Reported In: 8.7.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-28 02:00 UTC by Geoff King
Modified: 2025-07-29 22:46 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.8.0
Sentry Crash Report:


Attachments
screenshot showing boxes (21.27 KB, image/png)
2025-07-28 02:00 UTC, Geoff King
Details
screenshot showing boxes (19.34 KB, image/png)
2025-07-28 02:01 UTC, Geoff King
Details
image with the metadata (2.68 MB, image/jpeg)
2025-07-28 02:01 UTC, Geoff King
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff King 2025-07-28 02:00:27 UTC
Created attachment 183580 [details]
screenshot showing boxes

Since updating to 8.7.0 Digikam is showing box characters for the Caption and User Comment.  
Digikam 8.6.0 and prior did not do this.  

I need to explore more, but I think these are off the camera like this and are blank, but still have characters associated with them.  This appears to affect files from my Nikon Z50 and I think also processed by Nikon Studio. If you need more files or want me to test some more let me know. 

This occurs on both Mac and Ubuntu but the box font characters are a little different looking, maybe from different fonts?

STEPS TO REPRODUCE
1. Load one of these Nikon files into Digikam and look at Caption

See attached image and files. 

SOFTWARE/OS VERSIONS
Windows: ?
macOS: 15.5
Linux/KDE Plasma: 22.04
KDE Plasma Version: 
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3
Comment 1 Geoff King 2025-07-28 02:01:13 UTC
Created attachment 183581 [details]
screenshot showing boxes
Comment 2 Geoff King 2025-07-28 02:01:58 UTC
Created attachment 183582 [details]
image with the metadata
Comment 3 caulier.gilles 2025-07-28 05:28:18 UTC
Not reproducible at all with 8.8.0 :
https://imgur.com/a/ZoCr2mi
https://imgur.com/a/J49oafZ

AppImage for Linux is available here :

https://files.kde.org/digikam/

Best

Gilles Caulier
Comment 4 Maik Qualmann 2025-07-28 05:52:06 UTC
The problem can't be reproduced here either; the Exif user comment is empty. I think you're not on the final version of digiKam-8.7.0. Shortly before the release, there was a fix for the Exif user comment, which we now decode ourselves instead of leaving it to Exiv2.

Maik
Comment 5 Maik Qualmann 2025-07-28 06:36:49 UTC
With a null-byte ASCII comment, we might actually be decoding a string. I'll catch it additionally and fix it.

Maik
Comment 6 Maik Qualmann 2025-07-28 10:33:12 UTC
Git commit 22d049c2c92b2587ed74d3580356b7812a32ac08 by Maik Qualmann.
Committed on 28/07/2025 at 10:32.
Pushed by mqualmann into branch 'master'.

check the first byte of the ASCII comment for zero.
In Qt6, zero bytes are now also encoded into a QString.
FIXED-IN: 8.8.0

M  +1    -1    NEWS
M  +4    -1    core/libs/metadataengine/engine/metaengine_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/22d049c2c92b2587ed74d3580356b7812a32ac08
Comment 7 Maik Qualmann 2025-07-28 10:45:00 UTC
Git commit 48398acad6cc6cd5681f1dc172e15906f30e9302 by Maik Qualmann.
Committed on 28/07/2025 at 10:44.
Pushed by mqualmann into branch 'master'.

better remove all zero bytes from the comment also following

M  +9    -2    core/libs/metadataengine/engine/metaengine_p.cpp

https://invent.kde.org/graphics/digikam/-/commit/48398acad6cc6cd5681f1dc172e15906f30e9302
Comment 8 Geoff King 2025-07-29 22:46:57 UTC
I just tried digiKam-8.8.0-20250728T161845-Qt6-MacOS-arm64.pkg and it now works as intended. Thanks for the quick fix.