Bug 206261

Summary: [si_LK] can't input a sinhala letter ooyanna, gtk events processed out of sequence
Product: [Fedora] Fedora Reporter: Tyronne Wickramarathne <tywickra>
Component: scim-bridgeAssignee: Jens Petersen <petersen>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: aalam, behdad, caolanm, eng-i18n-bugs, lizhang, petersen, ryo-dairiki, smaitra, swijerat, tagoh, tywickra
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: scim-bridge-0.4.9-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-11 10:47:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 208066    
Attachments:
Description Flags
yeah, example patch
none
Actual result :: Wrong OOyaana combinations
none
Expected Result
none
Input of the sinihala comments none

Description Tyronne Wickramarathne 2006-09-13 10:46:20 UTC
+++ This bug was initially created as a clone of Bug #204922 +++

Description of problem:
in 0.2.0. typing o and oo looks no difference and always appears a sinhala
letter oyanna.

Version-Release number of selected component (if applicable):
open office version 2.0.4
0.2.0-1.fc6

How reproducible:
always

Steps to Reproduce:
1.activate scim-sinhala on open office say
2.type oo
3.
  
Actual results:
it displays ඔ (U+0D94)

Expected results:
it should displays ඕ (U+0D95)

Additional info:


-- Additional comment from smaitra on 2006-09-05 01:22 EST --
After discussing with Sinhala translator I got some info regarding this bug.

Definition of Second Modifier :

There is one term called second modifier which appear when any consonant is
combined with any dependent vowels consecutively 2 times, like suppose 'k' is a
consonant, and 'i' is a vowel so, now if if u want to write "kii" in that case
the letter 'i' is appearing 2 times consecutively with the consonant. in that
case the 2nd appearance of 'i' is called second modifier.

Example : For sinhala layout : 'kii' -> Not OK
          For samanala Layout : 'kii' -> Not OK
          For Wijesekera Lyout : 'lS' -> OK
The RAWCODE for kii is : U0D9A + U0DD3, where the Unicode - U0DD3 is the Second
modifier, which is appearing properly if typed, seleting RAWCODE from the scim
table. 

There are More lists of combinations with 2nd Modifier, an I will attach it with
this bug soon after getting from translator. 

-- Additional comment from llch on 2006-09-06 21:32 EST --
Quote from our language maintainer Tyronne:
"With having this bug almost over 90% of the Sinhala words cannot be written
properly.
 
This problem does not appear in FC rawhide, when you type in KDE, eg: kedit."

Comment 1 Caolan McNamara 2006-09-15 10:10:50 UTC
ok, are we agreed that we all see this...

a) input into kedit works ?
b) input into OOo *and* gedit does not work ?
c) cut and paste from kedit into OOo *and* gedit works ?

Is there an opened bug against some gnome component on this as well, likely a
common input problem with OOo and e.g. gedit.

Comment 2 Mayank Jain 2006-09-19 13:23:35 UTC
> a) input into kedit works ?
> b) input into OOo *and* gedit does not work ?
> c) cut and paste from kedit into OOo *and* gedit works ?

Kedit - yes - kdeutils-3.5.4-3.fc6
OOo - new findig - writer crashes on typing "kR" -
openoffice.org-writer-2.0.4-3.1  and libicu-3.6-2
Gedit - does not works - pango-1.14.3-2.fc6 and scim-sinhala-0.2.0-1.fc6
CnP from gedit to kedit works.



Comment 3 Mayank Jain 2006-09-19 13:32:19 UTC
> CnP from gedit to kedit works.

CnP from kedit to gedit works.


Comment 4 Mayank Jain 2006-09-19 13:35:31 UTC
CnP from kedit to oowriter also works

Comment 5 Caolan McNamara 2006-09-22 12:22:19 UTC
dudes, I haven't had time to invest in debugging this yet. But it is *so* going
to  be something to do with the generic sinhala input mechanism for gtk apps and
not something specific to OOo.

Comment 6 Lawrence Lim 2006-09-25 01:21:43 UTC
RE: Comment #5

Tried on gedit, it has the same *wrong* behviour as oowriter. At the moment, it
is leaning towards a pango issue, Bug 204922. Should icu be updated after the
pango is fixed?



Comment 7 Caolan McNamara 2006-09-25 08:42:47 UTC
I don't know what you're so sure that the problem lies in the pango and icu
renderers when cut and paste from kedit works, and raw code input works :-)

I suspect instead that the IM is somehow not delivering the characters to
gedit/OOo correctly. And I know there was a change to the sinhala input engine
recently so that's an added suspicion

so...

a) Here's a very interesting little fact, it works perfectly fine on x86_64 (!)
for both gedit and OOo (so possibly some timing or event ordering issue?) when I
input "kii"
b) if on i386 I revert scim-sinhala to 0.1.0-3.fc6 and restart scim, then it
works fine on i386 for both gedit and OOo for "kii"

Comment 8 Caolan McNamara 2006-09-25 15:49:38 UTC
I'll debug this, I suspect something like...

a) k
    emit unicode
b) i
    emit unicode
c) i
    emit backspace
    emit new different unicode

but that backspace gets delivered after the third unicode commit, or something
of that nature

Comment 9 Caolan McNamara 2006-09-25 17:16:30 UTC
Created attachment 137072 [details]
yeah, example patch

This patch is total crack, and not to be used. It just illustrates the problem,
which is that the backspace for the second unicode char is processed by gtk
after the commit of the third unicode character, so we end up with the 2nd
unicode remaining, not removed and replaced. 

scim-bridge needs to do what the scim gtk component does and try and use
g_signal_emit_by_name for the backspace keypress, e.g. see thread of
http://sourceforge.net/mailarchive/forum.php?forum_id=43684&max_rows=25&style=nested&viewmonth=200504

Comment 10 Caolan McNamara 2006-09-25 17:18:19 UTC
*** Bug 204922 has been marked as a duplicate of this bug. ***

Comment 11 Caolan McNamara 2006-09-26 08:53:38 UTC
*** Bug 206108 has been marked as a duplicate of this bug. ***

Comment 13 Mayank Jain 2006-09-26 12:52:08 UTC
"ii", "oo", "uu", "dH" are 1st modifier problems while "kRoo" are 2nd modifier
problems. Hence as per Tyronne, this bug is not duplicate of bug 203911

Comment 14 Ryo Dairiki 2006-09-26 14:34:38 UTC
The problem is the difference how forwarding key event is handled between
scim-gtkimm and scim-bridge-gtkimm.
The former handle the event immediately if possible, but the latter doesn't.
Okay, this bug must be fixed in the next release.

Comment 15 Jens Petersen 2006-09-27 01:38:46 UTC
Thanks, Dairiki.  I see a change related to this has been committed in cvs.

Comment 16 Jens Petersen 2006-09-28 10:08:50 UTC
Dairiki-san, I tested current scim-bridge cvs head with scim-sinhala-0.2.0
(scim-sinhala-trans cvs) and it doesn't seem to be quite right yet:

Now Inputting "oo" gives "ඔ" and then "oඔ" (not "ඕ").
At the same time the following output comes from gedit:

An unknown error occurred at scim_bridge_client_handle_key_event ()
An IOException at filter_key_event ()
An IOException occurred at scim_bridge_client_imcontext_filter_key_event ()
The message is recieved in a wrong context: key_event_handled


Comment 17 Jens Petersen 2006-09-28 11:20:48 UTC
*** Bug 207110 has been marked as a duplicate of this bug. ***

Comment 18 Jens Petersen 2006-09-28 11:21:59 UTC
*** Bug 206244 has been marked as a duplicate of this bug. ***

Comment 19 Ryo Dairiki 2006-09-28 16:25:51 UTC
I've applied another patch on the cvs latest.
I've confirmed that typing "oo" gives "ඔ" and then "ඕ".
Is it okay?

Comment 20 Jens Petersen 2006-09-29 02:33:03 UTC
Wonderful, seems to be fixed now in cvs. :-)
Thank you, Dairiki-san!

Comment 21 Jens Petersen 2006-09-29 13:00:49 UTC
I backported the patch in scim-bridge-0.4.5-3.fc6.

Comment 23 Ramakrishna Reddy Yekulla 2007-01-11 10:47:27 UTC
This seems to be fixed in  rawhide.

Package version 
scim-bridge-0.4.9-1.fc7
scim-bridge-gtk-0.4.9-1.fc7
fonts-sinhala-0.2.1-1

Steps to reproduce
1. Activate scim-sinhala.
2. in any editor or oowriter.
3. Type the keysequence "oo" 

Result
Sinhala Letter OOyanna OD95, which is the expected result in Comment #1. As the
issue has been fixed, Moving it to Resolved.

Comment 24 Ramakrishna Reddy Yekulla 2007-01-11 10:51:39 UTC
(In reply to comment #22)
> This seems to be fixed in  rawhide.
> 
> Package version 
> scim-bridge-0.4.9-1.fc7
> scim-bridge-gtk-0.4.9-1.fc7
> fonts-sinhala-0.2.1-1
> 
> Steps to reproduce
> 1. Active scim-sinhala
> 2. in any editor or oowriter
> 3. Type in the "oo" 
> 
> Result
> Gives me  Sinhala Letter Oyanna OD94
Scratch/Ignore this..happend thr a Mid Air collison ;-)


Comment 25 Ramakrishna Reddy Yekulla 2007-01-12 01:39:00 UTC
Created attachment 145415 [details]
Actual result :: Wrong OOyaana combinations

The is was the previous OOyana combination, the Actual error which were
previously occuring

Comment 26 Ramakrishna Reddy Yekulla 2007-01-12 01:42:20 UTC
Created attachment 145416 [details]
Expected Result

This is the correct expected result, which is working in the as mentioned in
Comment #24

Comment 27 Caolan McNamara 2007-01-12 09:40:30 UTC
So all is working correctly in rawhide now yes ? and no further action is being
called for.

Comment 28 Ramakrishna Reddy Yekulla 2007-01-19 01:40:22 UTC
Created attachment 145956 [details]
Input of the sinihala comments

o Selecting the scim-sinhala, key sequence
o Input "oo"
o gives you sinhala letter OOyana ඕ(U+0D95)
o Attaching the screenshot of gedit as evidence.

Comment 29 Caolan McNamara 2007-01-19 09:56:00 UTC
Does it currently work correctly, or does it currently not work correctly ?

If it doesn't work, then reopen and I'll look into fixing it. 
If it does work, then I don't think we need to keep adding comments to this bug :-)

Comment 30 Jens Petersen 2007-01-21 23:35:50 UTC
No need to worry, it is all good I think.

Comment 31 Ramakrishna Reddy Yekulla 2007-01-22 14:35:36 UTC
In reply to Comment #29

It works :-)