Bug 211574

Summary: [hi/ml/si_LK] cursor naviation is wrong when using ZWJ (200d)
Product: Red Hat Enterprise Linux 5 Reporter: A S Alam <aalam>
Component: pangoAssignee: Behdad Esfahbod <behdad>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: eng-i18n-bugs, lizhang, mshao, smaitra
Target Milestone: ---Keywords: i18n
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-20 12:28:19 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:
Attachments:
Description Flags
ZWJ problem with character cutting from middle
none
reference patch
none
proposed patch
none
my patch
none
the srcRPM for testing
none
hi_IN-ZWJ Error
none
ml_IN-ZWJ Error
none
si_LK ZWJ Error
none
pango test RPM none

Description A S Alam 2006-10-20 06:58:23 UTC
Description of problem:
when 200d is used with Halant (hi - 094d, ml -0d4d, then moving cursor to left
cut the
character by half

Version-Release number of selected component (if applicable):
pango-1.14.6-3.el5

How reproducible:
Everytime using ZWJ

Steps to Reproduce:
1. Open gedit and select keyboard hindi Inscript
2.  type  mo (type ZWJ) dY
3. move curor 2 times left
  
Actual results:
Cursor is blinking in between a character

Expected results:
Cursor should be at end of character

Additional info:
Screenshot is attaced

Comment 1 A S Alam 2006-10-20 06:58:23 UTC
Created attachment 138943 [details]
ZWJ problem with character cutting from middle

Comment 2 Akira TAGOH 2006-10-20 14:20:59 UTC
I guess it needs to be add one more step between 2 and 3 like

2.5. move the cursor to the beginning of line

And also guessing the above combinations of characters has to be treated as two
character, right?

So where is the boundary of those characters then?

BTW can you provide a testcase for Malayalam as well?


Comment 3 A S Alam 2006-10-23 13:08:57 UTC
Step 2.5.  can be added or without that also it can work.

these should treat as 4 characters (actually 3 characters and 1 halant)
position of cursor should be at end of 2nd character (DA) after moving cursor to
2 steps from Begining of line (Left).


Comment 4 Akira TAGOH 2006-10-23 13:54:22 UTC
I meant in the cursor movement perspective. if it should be treated as 4
characters, I don't see any issues then. the cursor position is at the end of
2nd character after pressing the right key 2 times from the beginning of line.
but 2nd character is transformed by ZWJ. and the cursor position is at the end
of line with more 2 times. so currently those is exactly treated as 4 characters.

Comment 5 Behdad Esfahbod 2006-10-23 18:29:24 UTC
Filed upstream:

  http://bugzilla.gnome.org/show_bug.cgi?id=364499

Akira, can you write a patch for it?

Comment 6 A S Alam 2006-10-24 08:32:11 UTC
Position should be like:
Sr. -------Key (english)-------Character------Word   ----Cursor Position
-----------------------------------------------------------
0    -------     NONE  -------                NONE ------- NONE  ----NONE
1     -------    m   -------              स       -------  स ----1
2   -------     o-------           द     -------   सद ---- 2
3   -------  ZWJ   ------- ‍   -------  सद‍---- 2
4  ------- d      ------- ् --------सद‍्---- 2
5  ------- Y --------- भ  ------------सद‍्भ----3
-----------------------------------------------------------
may my comment #3 confuse regarding 4 characters, it seems it should be like  3
characters


Comment 7 Akira TAGOH 2006-10-24 09:18:12 UTC
Ok, understood. thanks for clarifying this. so I suppose the patch I wrote when
I saw this bug report should works though, can you then provide a testcase for
Malayalam, please?


Comment 8 Akira TAGOH 2006-10-24 09:20:09 UTC
Created attachment 139205 [details]
reference patch

Comment 9 Behdad Esfahbod 2006-10-24 16:46:37 UTC
(In reply to comment #8)
> Created an attachment (id=139205) [edit]
> reference patch

So, is this the patch you recommend?

Comment 10 RHEL Program Management 2006-10-24 19:32:41 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 11 Akira TAGOH 2006-10-25 14:12:13 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > Created an attachment (id=139205) [edit] [edit]
> > reference patch
> 
> So, is this the patch you recommend?

I've confirmed that patch working for Hindi. but need to test it for Malayalam.
I'm waiting for giving me a testcase for it. aalam?

Comment 12 A S Alam 2006-10-26 13:03:00 UTC
Tagoh, I m sorry, but this problem is existing in all indic locale, where Halant
 (VIRAMA) is used.

bn=09CD
gu=0ACD
hi=094D
kn=0CCD
ml=0D4D
or=0B4D
pa=0A4D
ta=0BCD
te=0C4D

Sinhala need to confirm with LM, let you know tomorrow
thanks


Comment 13 Akira TAGOH 2006-10-26 13:45:52 UTC
Created attachment 139460 [details]
proposed patch

Ok, this patch should works. please provide the whole testcase.

Comment 17 A S Alam 2006-11-07 12:11:28 UTC
Akira it is not working for me in above give example.


Comment 18 Akira TAGOH 2006-11-07 13:34:07 UTC
Does "not working" mean you still see the same behavior? on Pango applied the
above patch, it works for me as you mentioned at comment #6.  Are you sure that
you were running on Pango with the above patch?

Or it's "not working" on anything else?

Comment 19 A S Alam 2006-11-08 11:45:23 UTC
yes, I run rpm from your given link
and
yes,  "not working" mean still see the same behavior

Comment 20 Akira TAGOH 2006-11-09 03:15:33 UTC
Hmm, actually I can see the different behavior between 1.14.6-3.el5 and my
testing package though. I need someone else to double-check this.

Comment 21 Akira TAGOH 2006-11-13 09:07:48 UTC
It may be unlikely but if you use x86_64 and just install my i386 testing
package, you won't see a difference. you have to rebuild srpm on your box and
install x86_64 binary for x86_64 box. or install gedit.i386.rpm if you are
testing on gedit say.

Comment 22 Liang Zhang 2006-11-20 10:38:06 UTC
Created attachment 141641 [details]
my patch

I wrote a patch for the bugs of moving cursor about Cons+ZWJ(or ZWNJ),
Cons+ZWJ(or ZWNJ)+Cons, Cons+ZWJ(or ZWNJ)+halant, Cons+ZWJ(or
ZWNJ)+halant+Cons, Cons+halant+ZWJ(or ZWNJ), Cons+halant+ZWJ(or ZWNJ)+Cons.
This patch can fix bug213646 too.
I think it can fix all bugs about moving cursor about ZWJ and ZWNJ.

Comment 23 Lawrence Lim 2006-11-28 04:14:22 UTC
LingNing, any test rpm for this bug??

Comment 24 Leon Ho 2006-11-29 01:39:37 UTC
*** Bug 213646 has been marked as a duplicate of this bug. ***

Comment 25 Liang Zhang 2006-11-29 02:10:05 UTC
Created attachment 142355 [details]
the srcRPM for testing

Comment 26 Behdad Esfahbod 2006-12-01 16:17:01 UTC
Can someone test and confirm that LingNing's patch works?

Comment 27 Liang Zhang 2006-12-04 06:15:43 UTC
aalam, could you please test the patch?
Thank you very much!
:)

Comment 28 Satyabrata Maitra 2006-12-04 10:06:49 UTC
Created attachment 142716 [details]
hi_IN-ZWJ Error

Comment 29 Satyabrata Maitra 2006-12-04 10:07:48 UTC
Created attachment 142717 [details]
ml_IN-ZWJ Error

Comment 30 Satyabrata Maitra 2006-12-04 10:08:28 UTC
Created attachment 142718 [details]
si_LK ZWJ Error

Comment 31 Satyabrata Maitra 2006-12-04 10:18:27 UTC
Hello LingNing

As I do not have setup for devel buildrpm to generate rpm from the srcrpm
attached, I found the same version pango-1.14.8-1.el5.i386.rpm in URL :
http://porkchop.redhat.com/brewroot/packages/pango/1.14.8/1.el5/i386, and tested
this bug.

Please inform if this rpm is not same as your srcrpm, and if not the same, may I
please request you to attach the rpm of that srcrpm with this bug, thus i can
retest it.

However the test result is...

Bug is not fixed, typing ZWJ - U200D is causing the cursor appearing middle of
the composed char for all 3 mentioned locales. Scrshots attached above for all 3
locales, above this comment.

Comment 32 Liang Zhang 2006-12-05 01:40:52 UTC
Hi Satyabrata,
The patch for this bug has not been in pango-1.14.8-1.el5.i386.rpm, it has not
been received, so the patch need you to test.
The patch was in the srcRPM which was attached, you can build this srcRPM, and
test the patch.
Thanks a lot! 


Comment 33 Lawrence Lim 2006-12-05 06:16:17 UTC
Created attachment 142806 [details]
pango test RPM

Test RPM attached.

Comment 34 Satyabrata Maitra 2006-12-05 08:08:00 UTC
Tested the bug with test RPM attached. The bug has been fixed. Cursor nevigation
for all 12 Indic Locales are showing OK using this RPM.

Version of Test RPM installed : pango-1.14.8-1.i386.rpm


Comment 35 Liang Zhang 2006-12-08 05:55:53 UTC
Behdad, did you read the comments?
:)

Comment 36 Behdad Esfahbod 2006-12-08 17:23:36 UTC
Ah, I wish I had read the comment yesterday and included the patch in the release.

Comment 37 Behdad Esfahbod 2006-12-08 21:29:23 UTC
Committed upstream.  Is this an exception?  Do you want me to patch pango in rhel-5?

Comment 38 Liang Zhang 2006-12-11 01:32:17 UTC
yes, please patch it in rhel-5, this bug is a blocker in rhel-5.

Comment 39 Behdad Esfahbod 2006-12-12 20:50:07 UTC
Built.

Comment 40 Satyabrata Maitra 2006-12-20 11:46:49 UTC
Retested the bug.
Cursor Nevigation is now OK with the latest package available mention below.

Component Version Tested :
pango-1.14.9-3.el5

Package is available in the tree :
http://porkchop.redhat.com/nightly/RHEL5-Client-20061218.nightly/tree-i386/Client/

So, resolving the bug for now.