Bug 469310 - digiKam won't import images that have emoji in the filename
Summary: digiKam won't import images that have emoji in the filename
Status: REOPENED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 8.2.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-03 13:23 UTC by Bravo Baavo
Modified: 2024-01-21 03:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Output log from Digikam (2.61 KB, text/plain)
2023-05-03 13:23 UTC, Bravo Baavo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bravo Baavo 2023-05-03 13:23:56 UTC
Created attachment 158652 [details]
Output log from Digikam

SUMMARY
***
When importing a file that includes an emoji, Digikam failed to form the correct SQL syntax and couldn't import the file:
My image was called "107779126_p0 - bookworm📖-.png"

See attached log file
***


STEPS TO REPRODUCE
1. Create an image called "107779126_p0 - bookworm📖-.png"
2. Try to import it into Digikam when using a MySQL database.

OBSERVED RESULT
No image will be imported, log shows more details.

EXPECTED RESULT
Image should be imported with the emoji filename.

SOFTWARE/OS VERSIONS
Ubuntu: Ubuntu 22.04.2
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.7 (built against 5.15.7)

ADDITIONAL INFORMATION
I'm using a MariaDB database version 10.11.2
Comment 1 Maik Qualmann 2023-05-03 19:48:17 UTC
Git commit 59b33200cb1dbcfa1d2dcb2956f606324ab03201 by Maik Qualmann.
Committed on 03/05/2023 at 19:47.
Pushed by mqualmann into branch 'master'.

perform database update to switch to utf8mb4
for file paths in Core and Thumbs DB
FIXED-IN: 8.1.0

M  +1    -1    NEWS
M  +22   -4    core/data/database/dbconfig.xml.cmake.in
M  +9    -1    core/libs/database/coredb/coredbschemaupdater.cpp
M  +21   -1    core/libs/database/thumbsdb/thumbsdbschemaupdater.cpp
M  +1    -0    core/libs/database/thumbsdb/thumbsdbschemaupdater.h

https://invent.kde.org/graphics/digikam/commit/59b33200cb1dbcfa1d2dcb2956f606324ab03201
Comment 2 Maik Qualmann 2023-05-03 19:58:15 UTC
Another short explanation. By default, UTF8 in MySQL is 3 bytes long (yes, UTF8 is not always UTF8). A 🙂 is already in the address space of 4 bytes.

Maik
Comment 3 Bravo Baavo 2023-05-03 21:33:52 UTC
Amazing thanks :)
Comment 4 Maik Qualmann 2023-05-05 06:13:49 UTC
Git commit 56a9195583a9938a931abcfa7ea67742b9d14ce3 by Maik Qualmann.
Committed on 05/05/2023 at 06:12.
Pushed by mqualmann into branch 'master'.

revert "perform database update to switch to utf8m"
Related: bug 431262

M  +4    -22   core/data/database/dbconfig.xml.cmake.in
M  +1    -9    core/libs/database/coredb/coredbschemaupdater.cpp
M  +1    -20   core/libs/database/thumbsdb/thumbsdbschemaupdater.cpp
M  +0    -1    core/libs/database/thumbsdb/thumbsdbschemaupdater.h

https://invent.kde.org/graphics/digikam/commit/56a9195583a9938a931abcfa7ea67742b9d14ce3
Comment 5 caulier.gilles 2023-10-11 05:07:37 UTC
Bravo,

What's about this file using current 8.2.0 AppImage Linux bundle ? It's
reproducible ?

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

Thanks in advance

Gilles Caulier
Comment 6 Bravo Baavo 2024-01-21 00:43:00 UTC
(In reply to caulier.gilles from comment #5)
> Bravo,
> 
> What's about this file using current 8.2.0 AppImage Linux bundle ? It's
> reproducible ?
> 
> https://files.kde.org/digikam/
> 
> Thanks in advance
> 
> Gilles Caulier

Hi Gilles,
Sorry for taking so long to get back to you, I tested today with 8.2.0 and can confirm the issue is still there.
I think the database change did fix it, but it was reverted because it caused some other problems here https://bugs.kde.org/show_bug.cgi?id=431262#c19

Happy to test any further changes let me know.
Kind regards,
Bravo.