SUMMARY *** Emoji typed via input method is not displayed in Kate after upgrade to KDE6. Some emojis copied from other applications like firefox are displayed in no color. *** STEPS TO REPRODUCE 1. Open the Kate 2. Try to type the emoji via input method like Fcitx5 OBSERVED RESULT Emoji displays normally. EXPECTED RESULT Emoji does not show up. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.0.1 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION Here is the screen record of the situation. https://vimeo.com/921076013?share=copy
I did some investigations and found out that the no color emoji is caused by the order in fontconfig. But it is still unable to type emoji in Kate.
Here's all the findings of the bug I encountered 1. The emoji typed via input method does not show up in Kate. For example, you use Fcitx5, type 'haha' and press 1, there will be 😃 displayed in Kate under normal circumstances. But the current situation is that 😃 does not show up. 2. Another problem that emoji copied from other applications displays in no color is my fault. Once I raised the priority of Twemoji in the fontconfig, the colors come back.
Can reproduce inputting emojis by fcitx5 not working. The color being black and white is a local config issue.
The problem is that KateViewInternal::isAcceptableInput returns false for emojis https://invent.kde.org/frameworks/ktexteditor/-/blob/master/src/view/kateviewinternal.cpp#L3348
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/674
Git commit f9f7f640b05d96b8dcf779ea72d5c3e2315da0df by Yifan Zhu. Committed on 21/03/2024 at 04:58. Pushed by cullmann into branch 'master'. kateviewinternal: accept surrogate category character This is added to QInputControl::isAcceptableInput in https://github.com/qt/qtbase/commit/e688b99995b8c624dbcea296c99fb89262d29e15. M +9 -2 src/view/kateviewinternal.cpp https://invent.kde.org/frameworks/ktexteditor/-/commit/f9f7f640b05d96b8dcf779ea72d5c3e2315da0df