Bug 458442

Summary: Arabic keyboard layout sends ligatures as one character (Laa Problem)
Product: [Plasma] kwin Reporter: AvidSeeker <avidseeker7>
Component: inputAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: dev, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description AvidSeeker 2022-08-28 20:28:59 UTC
SUMMARY
KDE sends [Arabic ligature glyphs](https://en.wikipedia.org/wiki/Arabic_alphabet#Ligatures) as a single glyph. For example, Laa+Alif ligature "لا" (U+0644, U+0627) is sent as "ﻻ" (U+FEFB), and similarly for (ﻷ، ﻵ، ﻹ).


STEPS TO REPRODUCE
1. Settings > Keyboard > Add default Arabic layout
2. Type "ﻻ" (i.e: "b" in QWERTY keyboards)

OBSERVED RESULT
Output is ﻻ (U+FEFB)

EXPECTED RESULT
Output is لا (U+0644, U+0627). 

SOFTWARE/OS VERSIONS
All latest update

ADDITIONAL INFORMATION
To clarify for English, this is like having a key to type a ligature. Say that you want to press "b" to type two characters: "fi" but instead you get "fi" as a single character. This is exactly what's happening with Arabic.
Comment 1 Nate Graham 2022-08-30 20:28:01 UTC
I don't know what part of the stack is responsible for this, but I very much doubt it's anywhere in KDE code.
Comment 2 AvidSeeker 2022-08-30 22:34:22 UTC
(In reply to Nate Graham from comment #1)
> I don't know what part of the stack is responsible for this, but I very much
> doubt it's anywhere in KDE code.

At first I expected it to be from ibus, but then I tried a fresh installation of KDE without ibus and the problem persisted.
Comment 3 Wismill 2024-10-05 14:22:14 UTC
I cannot reproduce this Plasma 6.1.5.

@AvidSeeker The sequence you expect is defined at: https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/f2ebbce6d0978d2d84f840196b03ee35a3ca1736/nls/en_US.UTF-8/Compose.pre#L4523, while the relevant key in this Arabic layout is: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/0f42a9a5b06262e35392680a3ad3d9cad3175086/symbols/ara#L53.

So you may have an issue with the Compose file parsing, which would lead to not replacing UFEFB for "لا". Do other Compose sequence work? Is there other that do not work?
Comment 4 AvidSeeker 2025-07-31 05:31:31 UTC
Thank you for the update. There has been a lot of investigation on this issue in the past three years that I gathered in this blog post: https://avidseeker.github.io/lam-alif

tldr: it affects gtk programs and there's already an issue about this to gtk. https://gitlab.gnome.org/GNOME/gtk/-/issues/7678
It can be resolved by installing ibus.