Community
Participate
Working Groups
Scenario: 1. Create a java project 2. Create a java class. Make sure that you enter the com.ibm.dbcstesting.javatest for the package name and you select the inclusion of main() in the wizard. 3. In Main method on the Editor, type the following code line: System.out.println(" ABCabc "); where capitals are Hebrew characters. 4. Run as Java application. Result: The string is displayed on console as: "abcABC" Expected result: The output of the string should be as shown in the editor and shouldn't have contextual ordering.
That's the console.
There are no hebrew speakers on the debug team. Could you please provide a test case (java class) and a screen shot of the result you are getting. What is your default encoding?
Running this code, you'll see that the console shows the same thing as Swing's JOptionPane. String s = "\u05D2"+"\u05D2"+"\u05D2"+"\u05D1"+"\u05D0"; System.out.println(s); JOptionPane.showConfirmDialog(null, s); What is the expected behaviour here?
Kevin, your test string contains only Hebrew characters. I think your test string should have mixed BiDi and Latin characters e.g. String s = "\u05D3\u05D2\u05D1" + "abc"; I tried this example in M5 and it rendered in the Console as I would expect. I will attach a pic. Amir, what is the build id you are using (in the About dialog)? Can you attach a screen shot?
Created attachment 35579 [details] screen shot of Console with mixed BiDi characters
Kevin, I guess you'll need a BidiSegmentListener similar as it is used in the JDISourceViewer or the JavaSourceViewer. However, make sure this is only applied to things where you show programming code, like Java. HTH Dani
Build id: I20051215-1506 Please note that this defect is refer only for Linux platform. When I'm running the same code that Karice had running, I get different result (contextual ordering). I will attach a screen shot.
Created attachment 35600 [details] Screen shot of console with mixed BIDI and Latin text
I was using windows - didn't notice it was platform-specific.
Created attachment 35612 [details] Mac Screen Shot Seems fine on Mac too. Will test linux this afternoon.
Created attachment 35616 [details] linux Looks good on my linux box also.
Hmm, not sure if this would make a difference for the Console, but what Linux is Amir using - Motif? GTK? what version/update is it?
I'm using GTK version 2.4.0
I'm running on an older GTK version (2.2.4). We tested this on a new version of GTK (2.6) and got the same incorrect behavior that Amir is seeing on 2.4.
Created attachment 35796 [details] test case
Comment on attachment 35796 [details] test case This is reproducible with an SWT StyledText widget. On GTK 2.2 the Text displays "XXXabc" and on GTK 2.6 it displays "abcXXX"
reassigning to SWT for comment
FH? Your thoughts?
fixed in head > 20060307 the base_dir in pango 1.2 is PANGO_DIRECTION_LTR, in pango 1.4 they changed to PANGO_DIRECTION_WEAK_LTR and added the pango_layout_set_auto_dir(). To understand this problem read the for pango_layout_set_auto_dir(). SWT by design is (strong) left-to-right, to draw text with base_dir==RTL one needs to create a Canvas with SWT.RIGHT_TO_LEFT, create a TextLayout and call setOrientation() with SWT.RIGHT_TO_LEFT. Please, verify the fix. thank you.
Verified with build id: I20060315-1200
The problem has been fixed.