https://bugzilla.redhat.com/show_bug.cgi?id=2125153
Bug ID: 2125153 Summary: ibus does not support special Arabic compose sequences Product: Fedora Version: 36 Status: NEW Component: ibus Assignee: tfujiwar@redhat.com Reporter: mfabian@redhat.com QA Contact: extras-qa@fedoraproject.org CC: i18n-bugs@lists.fedoraproject.org, shawn.p.huang@gmail.com, tfujiwar@redhat.com Target Milestone: --- Classification: Fedora
The following compose sequences do not work in ibus:
$ grep -i arabic.*ligature /usr/share/X11/locale/en_US.UTF-8/Compose # Arabic Lam-Alef ligatures <UFEFB> : "لا" # ARABIC LIGATURE LAM WITH ALEF <UFEF7> : "لأ" # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE <UFEF9> : "لإ" # ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW <UFEF5> : "لآ" # ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE
They are needed because the Arabic keyboard layout outputs UFEFB on some key:
$ grep -i fefb /usr/share/X11/xkb/symbols/ara key <AB05> { [ UFEFB, UFEF5, NoSymbol, NoSymbol ]}; // ﻻ ﻵ key <AB05> { [ UFEFB, UFEF5, U06AB, U06AD ]}; // ﻻ ﻵ ګ ڭ
but the UFEFB characters is not what is desired, what one really wants is U+0644 U+0627. But xkb keyboard layouts can only output one keysym when typing a key, not two. So compose was used as a hack to work around this limitation of xkb:
The keyboard produces UFEFB and then the compose support replaces this with U+0644 U+0627.
This works when the compose support in Xorg is used but not when the compose support in ibus is used.
How to reproduce:
1) First show that it works when using the Xorg compose support:
Start xterm like this (to disable ibus and use the Xorg compose support):
env XMODIFIERS=@im=none xterm &
Then in the xterm, type
$ echo -n b | iconv -f utf8 -t utf16le | od -x 0000000 0062 0000002
and we see that the b produces U+0062, which is correct.
Switch to the Arabic keyboard
setxkbmap ara
type “arrow up” to get the echo -n b | iconv -f utf8 -t utf16le | od -x line back, go back to the b with “arrow left”, type b and now one gets:
echo -n لا | iconv -f utf8 -t utf16le | od -x 0000000 0644 0627 0000004
I.e. even though the keyboard surely outputs only U+FEFB, the Compose support of Xorg transforms this into U+0644 U+0627
2) Now repeat the same test using the compose support in ibus:
Start xterm like this to use the ibus compose support:
env XMODIFIERS=@im=ibus xterm &
Then in the xterm, type
$ echo -n b | iconv -f utf8 -t utf16le | od -x 0000000 0062 0000002
and we see that the b produces U+0062, which is correct.
Switch to the Arabic keyboard
setxkbmap ara
type “arrow up” to get the echo -n b | iconv -f utf8 -t utf16le | od -x line back, go back to the b with “arrow left”, type b and now one gets:
echo -n ﻻ | iconv -f utf8 -t utf16le | od -x 0000000 fefb 0000002