Bug 406583 - Cannot write special characters (è, í, ó) in Tag search box
Summary: Cannot write special characters (è, í, ó) in Tag search box
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Manager (show other bugs)
Version: 8.0.0
Platform: Appimage Linux
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-15 23:50 UTC by MarcP
Modified: 2023-10-14 18:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments
Sample images to reproduce the problem (662.60 KB, application/zip)
2022-02-17 22:14 UTC, MarcP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2019-04-15 23:50:54 UTC
SUMMARY

On occasions, I the search box in the Tag panel does not let you write accented characters. For instance, if you write "í", "i" will appear instead. That prevents from searching some tags. For instance, if you try to write the last name "Martínez".

It only happens from time to time. I think it only happens when other tags are suggested while you type.


STEPS TO REPRODUCE
1. Search a Tag in the tag panel search box.
2. Try to type an accented character, while other similar tags are suggested.

OBSERVED RESULT
An non-accented character appears.


EXPECTED RESULT
An accented character should appear.


SOFTWARE/OS VERSIONS

Ubuntu 18.04 with Gnome
digikam-6.1.0-git-20190404T203330-qtwebkit-x86-64.appimage
Comment 1 MarcP 2019-07-27 11:17:35 UTC
Hey, sorry to be insistent, but can I bring some attention to this issue?

I have narrowed it down, and it appears that letters with special characters cannot be written (they appear as plain letters é -> e) only when the autocomplete suggestion box when typing is present on screen. 

So let's say I have a tag called "María". If I start writing that name, it would appear as "Maria" (and nothing would come up). But if I start typing a non-existing tag, so the autocomplete box does not pop up, I can perfectly type something like "Waría" (and nothing would come up either, because it doesn't exist).

That makes it harder to find tags with very common names.

PS: Another option could be to be more permissive with search results, including accented letters even when searching non-accented ones (e.g. searching "maria" would show "maría, mària, märìa, etc.)
Comment 2 Maik Qualmann 2019-07-27 12:48:00 UTC
I've been investing in this issue for a while, but the problem is with the Qt popup. The moment the popup is opened, it takes over the input text to filter and display its list model. If the text contains these special characters, they are ignored. I had also found another Qt program that had the same error.

Maik
Comment 3 MarcP 2019-07-27 13:06:16 UTC
Thanks for checking it out, Maik.
Comment 4 MarcP 2020-05-27 00:22:13 UTC
I am pleasantly surprised that in digikam-7.0.0-rc-20200526T141006-x86-64.appimage this problem no longer occurs. I can type any kind of special character both in the search box and in the tag entry field, and works just fine.

I guess this bug can be closed now.
Comment 5 MarcP 2020-05-29 12:25:54 UTC
I am sorry, I didn't test it thoroughly. It seems that the bug is still there, both in the appimage and the flatpak version of digikam.
Comment 6 caulier.gilles 2020-07-31 13:01:23 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best Regards

Gilles Caulier
Comment 7 MarcP 2020-07-31 14:24:21 UTC
The bug is still there. 

I think it's the most annoying bug I can find in digikam now, since I can't search for elements that contain special characters in their name.

Also, the search is sensitive to these characters, so writing the same word without accents does not work.
Comment 8 caulier.gilles 2021-07-19 06:53:51 UTC
With next digiKam 7.4.0 release, AppImage bundle is compiled using a more recent Linux Mageia 7.1 host. Last stable Qt 5.15.2 and KF5 5.84 are used. ImageMagick codec 7 and libav 58 (ffmpeg) are used to supports extra image and video formats.

https://i.imgur.com/XV1tZkL.png

Please check if problem still reproducible with this version available as pre-release here:

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

Gilles Caulier
Comment 9 MarcP 2021-07-22 17:53:24 UTC
I confirm that the bug is still present in version 7.4.0 rev c837733d5b7d48a801a43fcda5b7b6e548b3966a
Comment 10 caulier.gilles 2022-01-19 19:09:24 UTC
Git commit 00e4d5da2948ccdc101cdeeb23f7b05405812436 by Gilles Caulier.
Committed on 19/01/2022 at 19:04.
Pushed by cgilles into branch 'master'.

Great news : AppImage with Qt 5.15.2 compiled under Mageia 7.1 now support ICU
This require to recompile whole AppImage build system on Continuous Deployement server.
This will be done in a few days. I only tested here on my laptop, and i can confirm that ICU work fine now.
Related: bug 425168, bug 418670, bug 410980, bug 407506, bug 413842

M  +2    -3    project/bundles/3rdparty/ext_qt/5.15/CMakeLists.txt

https://invent.kde.org/graphics/digikam/commit/00e4d5da2948ccdc101cdeeb23f7b05405812436
Comment 11 caulier.gilles 2022-02-05 17:35:33 UTC
Hi,

With the ICU support introduced in next 7.6.0 release, this problem is now fixed.

You can test using 7.6.0 pre-release AppImage bundle available here : https://files.kde.org/digikam/

Best Regards

Gilles Caulier
Comment 12 MarcP 2022-02-05 21:03:05 UTC
Hi. I tried with the latest appimage (digiKam-7.6.0-20220205T123907-x86-64.appimage) but the problem is still there. Maybe the change has not been introduced until tomorrow's built?
Comment 13 caulier.gilles 2022-02-05 21:35:09 UTC
Hi Marc,

I tested here and all work as expected... All search text field accept now the UTF8 characters.

AppImage used is digiKam-7.6.0-20220205T123907-x86-64.appimage.

Gilles Caulier
Comment 14 caulier.gilles 2022-02-05 21:49:26 UTC
A screenshot :  https://i.imgur.com/0UsQDBA.png

Gilles Caulier
Comment 15 MarcP 2022-02-05 22:51:56 UTC
Mmm, It's only in some cases, like I mentioned in comment #2, where two tags differ only by one letter written with a special character, like Maria and María. In those cases, you cannot write the accented character (í), only the generic one (i). Otherwise I can type them (as I could before).
Comment 16 MarcP 2022-02-17 20:06:43 UTC
Can we have a look at this? I see that v7.6 uses Qt Version 5.15.3, but nothing changed regarding this bug or bug #413842
Comment 17 caulier.gilles 2022-02-17 21:25:40 UTC
And AppImage is now compiled with ICU support, the main problem.

Do you see my screenshot from comment #14 ?

Which characters cannot be enter in text field ?
Comment 18 Maik Qualmann 2022-02-17 21:34:50 UTC
Gilles, I can reproduce the problem. Accents work in the filter bar. In the tags input field only the first letter is possible as an accent. I think it has something to do with the QCompleter, when it opens, accent keys are no longer possible. 

Maik
Comment 19 MarcP 2022-02-17 22:14:13 UTC
Created attachment 146897 [details]
Sample images to reproduce the problem

Hi Gilles,

I saw your screenshot, but I think we are talking about different issues. I can write special characters as long as there isn't the same work without the special characters in the list.

As an example, I have attached two images. One with María Félix, and another with Maria Sharapova. If you import them into digikam, you'll see it's impossible to search (in the tag browser) for María if Maria Sharapova is already there. The word María will be written without the accent, and thus María Félix won't appear in the search results.
Comment 20 MarcP 2022-03-07 22:10:05 UTC
Should we reopen this issue (and bug #413842) so we can look further into it?
Comment 21 caulier.gilles 2022-03-08 06:44:51 UTC
yes, i can reproduce again the problem.

What' s the condition to see or not the dysfunction ? I don't know...
Comment 22 Maik Qualmann 2022-03-08 07:23:42 UTC
The problem is the popup. As soon as this is displayed, Qt ignores the input for accents.

Maik
Comment 23 caulier.gilles 2022-03-08 19:28:40 UTC
Maik,

enabling all debug space with qt (very verbose), i can see these lines with 7.7.0 pre-release AppImage :

unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4
unknown: Could not create collator for "en" :: ICU return value: 4

Why ?

Gilles
Comment 24 Maik Qualmann 2022-03-08 19:40:25 UTC
The QCollator loads a large file, this was also the reason for the large speed increase after putting the QCollator in a static class. I suspect that this is not included in the AppImage, I'll look for the name of this file right away.

Maik
Comment 25 Maik Qualmann 2022-03-08 19:49:22 UTC
/usr/share/icu
└── 70.1
    ├── config
    │   └── mh-linux
    ├── icudt70l.dat
    └── mkinstalldirs

When I rename the icudt70l.dat file I get similar error messages, it's 28MB in size.

Maik
Comment 26 caulier.gilles 2022-03-08 19:50:04 UTC
The ICU data file can be included as resource in library if i remember.

But...

Master compile libicu for AppImage and Qt6 :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/appimage/01-build-host.sh#L270

...with data as resource:

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/3rdparty/ext_libicu/CMakeLists.txt#L20

...and qt5-maintenance use system libicu, and data file is separated i think...

https://invent.kde.org/graphics/digikam/-/blob/qt5-maintenance/project/bundles/appimage/01-build-host.sh#L268

Gilles
Comment 27 caulier.gilles 2022-03-08 19:51:00 UTC
Ok well seen. I will include icu data file tomorrow...

Gilles
Comment 28 Maik Qualmann 2022-03-08 20:27:15 UTC
However, the problem in this bug report is not related to the QCollator, the problem here is the QCompleter, which takes over the keys events when activated.

Maik
Comment 29 caulier.gilles 2022-03-08 21:58:41 UTC
Git commit e55eb3e3aab914e88690d00e23d05c81af5f9820 by Gilles Caulier.
Committed on 08/03/2022 at 21:57.
Pushed by cgilles into branch 'qt5-maintenance'.

add ICU data file to the bundle

M  +1    -0    project/bundles/appimage/04-build-appimage.sh

https://invent.kde.org/graphics/digikam/commit/e55eb3e3aab914e88690d00e23d05c81af5f9820
Comment 30 caulier.gilles 2022-03-09 08:13:32 UTC
Marc,

I just tested with digiKam-7.7.0-20220308T173410-x86-64.appimage and now non-latin1 characters work again.

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

The missing ICU file data was the problem. The QCollator warnings on the console disappear.

Please check with this appimage bundle at least or later version and let's me hear if all is fine for you.

Best

Gilles Caulier
Comment 31 MarcP 2022-03-09 18:44:18 UTC
Hi Gilles,

I'm sorry, I tried with today's appimage (digikam 7.7.0 Rev.: 501a282fba3867f2152afc82f91243ca0023b5aa ) but the issue is still there. I cannot enter special characters if the popup is present. Maybe my computer have some outdated libraries that could interfere? (next month the next LTS version of ubuntu will be released and I'll upgrade it).
Comment 32 caulier.gilles 2022-03-09 18:47:57 UTC
Marc,

If you use AppImage, there is not problem of outdated libraries as the most important components are embedded in the bundle.

The Q is why it work for me. I tried with tag search field on the bottom on left sidebar where some keywords use "ü" characters.

Gilles
Comment 33 MarcP 2022-03-09 18:54:41 UTC
Can you type it if the popup if open with suggestions? I tried "Park Güell" and I couldn't type the "ü". However, I can copy and paste that character in the field even if the popup is open. Also, characters that only require one key to be typed work fine (like ñ and ç in a Spanish keyboard), it only fails for those which require a modifier first, like accents and dieresis/tréma (èéïü).
Comment 34 caulier.gilles 2022-03-09 19:02:12 UTC
yes it work : https://i.imgur.com/hmSt7E7.png

Maik, did you reproduce again the dysfunction ?

Gilles
Comment 35 Maik Qualmann 2022-03-09 19:21:13 UTC
Hi Giles,
I can even reproduce the issue with my native digiKam version. As long as the popup doesn't appear, I can press the accent key and the "e" to make "é". Once the popup has appeared, I can no longer create accents. Maybe a silly question, are accents directly assigned on a French keyboard?

Maik
Comment 36 MarcP 2022-03-09 19:32:31 UTC
Gilles, try typing "Schl" and then the ü.
Comment 37 Maik Qualmann 2022-03-09 19:37:25 UTC
The example with the "ü" would work on my German keyboard without any problems, since I have a "ü" directly on the keyboard. Hence my question to you Marc, do you use an accent key?

Maik
Comment 38 Maik Qualmann 2022-03-09 19:42:19 UTC
Ok, didn't read comment 23, Marc also uses an accent key for special characters.

Maik
Comment 40 caulier.gilles 2022-03-09 20:23:32 UTC
yes French keyboard are accentuate characters : éèàüûù

Gilles
Comment 41 caulier.gilles 2023-05-04 03:30:30 UTC
@MarcP

digiKam 8.0.0 is out. This entry still valid with this release ?

Best regards

Gilles Caulier
Comment 42 MarcP 2023-05-04 03:31:49 UTC
Yes, this is still an issue. (Although it was solved in that preview for the next version of qt)
Comment 43 caulier.gilles 2023-10-08 07:33:01 UTC
MarcP,

The new digiKam AppImage pre-release 8.2.0 is now based on Qt5.15.11 (previous version used Qt5.15.7).

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

Please check if problem remains.

Thanks in advance

Gilles Caulier
Comment 44 caulier.gilles 2023-10-12 05:31:19 UTC
I just tested with last 8.2.0 AppImage bundle based on Qt 5.15.11 and prblem is not reproducible here. This is true for the tag filter and tag enter fields.
Comment 45 MarcP 2023-10-13 01:22:07 UTC
Hi. I'm sorry to disappoint, but the issue is still present, at least on my end. I tested it on the digiKam-8.2.0-20231007T150049-x86-64.appimage version, under Kubuntu 22.04 LTS.

However, something changed. Until now, I couldn´t type special characters when the popup was present, but now I'm unable to write any kind of accented character. So I cannot write something like "María" under any circumstances. I can write it on a notepad and paste it, though. I tried it both in the Tag search and in the People search fields.

I'm using a US keyboard with the "English (US, intl., with dead keys)" variant to be able to type special characters, but I have also configured the standard Spanish layout just to test if that special US variant was interferring, but the result was the same.
Comment 46 caulier.gilles 2023-10-13 13:26:43 UTC
Hi Marc,

I cannot reproduce definitively this problem on my KUbuntu computer, with the native build or the AppImage. Language is French and all work perfectly here.

Double check the spell-check options in text field to see no side effects break the characters. Look the context menu over the text widget especially.

Gilles
Comment 47 MarcP 2023-10-13 13:40:11 UTC
That's strange, maybe it's my particular installation/configuration. I will try later today from a Windows 10 computer and possibly a MacOs computer as well, see if I can replicate this issue there too.
Comment 48 MarcP 2023-10-14 18:15:36 UTC
Hello again Gilles,

I did a clean install on a Windows 10 computer, and the special characters work perfectly there. So there's definitely something wrong with my Kubuntu installation/configuration. I'll try to figure it out. Thanks though!