Bug 140025 - Bidi3.2: Arabic text is not displayed properly in some text fields
Summary: Bidi3.2: Arabic text is not displayed properly in some text fields
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: VE (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux-GTK
: P5 critical (vote)
Target Milestone: ---   Edit
Assignee: Peter Walker CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 140002 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-03 13:16 EDT by Ahmed Farrag CLA
Modified: 2011-06-13 11:37 EDT (History)
8 users (show)

See Also:


Attachments
screen shot showing corrupted Arabic data in the text areas (65.20 KB, image/jpeg)
2006-05-03 13:18 EDT, Ahmed Farrag CLA
no flags Details
"Designtime" fig (32.65 KB, image/jpeg)
2006-06-01 08:12 EDT, Ahmed Farrag CLA
no flags Details
"Runtime" figure (44.65 KB, image/jpeg)
2006-06-01 08:12 EDT, Ahmed Farrag CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmed Farrag CLA 2006-05-03 13:16:29 EDT
OS: RHEL 4.0
Build ID: I20060419-1640

Description:
Arabic text is not displayed properly in some text fields as "JTextPane", "JTextArea",and "JTable".

Steps to recreate the problem:

1) Create Java project.
2) Create visual class, choose its style to be "Swing"-> "Application".
3) From the palette (Swing component), drag "JTextPane", or "JTextArea" on the created Application.
4) Type in some Arabic data in the newly created text area.

Expected output:

Arabic data should be displayed properly in all text areas.

Actual output:

Arabic text is not displayed properly, see the attached fig for more illustration.
Comment 1 Ahmed Farrag CLA 2006-05-03 13:18:26 EDT
Created attachment 40265 [details]
screen shot showing corrupted Arabic data in the text areas
Comment 2 Jeff Myers CLA 2006-05-03 20:28:56 EDT
*** Bug 140002 has been marked as a duplicate of this bug. ***
Comment 3 Peter Walker CLA 2006-05-23 15:58:19 EDT
Ahmed,
Thank you for reporting this bug. We have tried unsuccessfully to create this problem in the lab on a Windows machine. There seems to be no problem typing in Arabic characters. The characters show correctly in VE and in the running application. We also tried to recreate this problem on a RedHat Linux box but couldn't enter Arabic characters. Although pasting Arabic characters from the Character map tool into a textfield worked successfully.

Since we do not support BIDI on Linux, I am lowering the severity to normal but will leave the bug open to possibly look at this in a future time when Eclipse SWT has better support on Linux.

Best regards....
Peter Walker 
VE Developer
Comment 4 Lina Kemmel CLA 2006-05-24 07:52:38 EDT
Ahmed,
We can see Bidi characters properly. Have you tried changing the font (in the text field Properties view)?

Peter,
Widget shown on attachment 40265 [details] looks like a Swing one (it's out of focus, moreover, seems to appear not at design time), and thus is under Swing's and not SWT responsibility. What do you think?
Comment 5 Ahmed Farrag CLA 2006-05-25 02:57:27 EDT
Peter,
This problem exists in a Swing component not in an SWT one as
mentioned in my description above, so I think (correct me if I
am wrong) it is under the Swing team responsibility to resolve 
this bug.

Lina,
I guess this problem is not related to font because in design 
time the Arabic text is dispalyed correctly, however in run time 
and in the "Java Beans" view the Arabic text is corrupted as 
shown in the attached figure. 

I am sorry to say that, but I would have to raise the severity 
again to critical. This bug is seriously impacting any application 
designed by VE that requires Arabic support.

I would be glad to offer any help you might need in order to 
resolve this bug.
Comment 6 Lina Kemmel CLA 2006-05-25 03:36:17 EDT
Ahmed, font specified via the font selection dialog applies to a Swing component and gets reflected in the underlying Java code. This font will be in effect at runtime and at design time - but as far as I understand only after you finish entering text into the control.

Comment 7 Lina Kemmel CLA 2006-05-25 03:45:05 EDT
> This font will be in effect at runtime and at design time - but as far as I 
> understand only after you finish entering text into the control.
I meant it would be in effect for the control at runtime - always, and at design time - when the control is out of input focus.
Comment 8 Peter Walker CLA 2006-05-31 11:00:50 EDT
(In reply to comment #5)
> Peter,
> This problem exists in a Swing component not in an SWT one as
> mentioned in my description above, so I think (correct me if I
> am wrong) it is under the Swing team responsibility to resolve 
> this bug.
> 
Ahmed,
I agree it's a Swing problem not SWT (though it's still the same team for support). 


> 
> I am sorry to say that, but I would have to raise the severity 
> again to critical. This bug is seriously impacting any application 
> designed by VE that requires Arabic support.
> 
> I would be glad to offer any help you might need in order to 
> resolve this bug.
> 

If possible, please correspond and work with Omar Bahy (OBAHY@eg.ibm.com) to try to recreate this problem. He replied with a note saying the scenario worked fine for him and couldn't reproduce the problem. Perhaps it is something to do with your font or screen resolution? Perhaps you could share system configuration with to see what's different. 
Here's the note he sent me on 5/26/06:

------------ Begin Note -----------
Hello Peter,

I managed to recreate the scenario of the defect 140025, and it worked fine.  I do not know if there is any configurations or setting-up issues related to this defect that may affect the result.

Wishing you a pleasant vacation :)

Best Regards,
Omar Bahy
------------- End Note ------------
Comment 9 Ahmed Farrag CLA 2006-06-01 08:11:36 EDT
(In reply to comment #8)

Peter,
When you run the created visual class (with a blank text field area) and enter Arabic text at runtime, you will find that Arabic text is not displayed properly as shown in the attached "Runtime" figure. The same thing happens when you enter Arabic text at designtime in the "Java bean" editor (not in the design view), you will find that Arabic text is not displayed correctly in "Java bean" view.

However, if you tried to enter Arabic text at designtime, it would be displayed properly in the Design view, and it would be propagated and displayed correctly in "Java bean" view & at runtime (see the attached "Designtime" fig). 

I tried to change the font but the same problem still persists regardless of the used font.

BTW, pasting Arabic characters into the text field area won't help you reproduce the problem, The problem only appears when you type Arabic data directly in the text field area.

I am conducting the bidi testing with the following configurations:
1) RHEL 4.0 with default Arabic-Egypt locale
2) Eclipse: RC5 build
3) VE: 1.2RC1 build

I hope this would help you reproduce the problem. 
Please let me know if you need anything else.
Comment 10 Ahmed Farrag CLA 2006-06-01 08:12:10 EDT
Created attachment 43239 [details]
"Designtime" fig
Comment 11 Ahmed Farrag CLA 2006-06-01 08:12:43 EDT
Created attachment 43240 [details]
"Runtime" figure
Comment 12 Steven Wasleski CLA 2006-06-01 12:24:37 EDT
I have not been involved day to day in this one, but the latest comments make it sound like the runtime configuration being used to launch the application (the "Runtime" figure) may be missing some parameters.  Should it include an option to set the locale for the running app?  Ahmed, what options (from the "Arguements" tab) are you using to launch the Java application in the "Runtime" figure?  Peter, am I making sense here?
Comment 13 Peter Walker CLA 2006-06-05 20:39:07 EDT
Deferred until later fixpack or release. Can't recreate problem for analysis or debugging.
Comment 14 Ahmed Farrag CLA 2006-06-06 09:28:05 EDT
(In reply to comment #12)

Steven,

I didn't pass any arguments nor use any options to launch the java application.
Comment 15 Ahmed Farrag CLA 2006-06-06 10:16:33 EDT
(In reply to comment #13)

Peter,
I perfectly understand the pressure you are currently under, and I realize that a fix for this bug won't be feasible in R3.2 so we hope that a fix will be available in R3.2.1 or in any fixpack before that.
Comment 16 Eclipse Webmaster CLA 2009-08-30 02:47:59 EDT
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.