Community
Participate
Working Groups
Platform(s) : Win Xp,98,2000,ME,NT Scenario Details: By doing the following steps 1)Right click on the folder Sources -->New -->Other-->Java-->ScrapBook Page 2)Fill in a java scrapbook name :"test" 3)Click finish 4)The ScrapBook appears in the navigator view under the folder Sources, And the source of the class is displayed in the right panel. 5) write : System.out.println("hojfhv"); where hojfhv are Arabic characters. Actual Results: All Arabic text is displayed as question marks. Expected Results: Arabic characters appear correctly. Note: This problem does NOT happen on a Hebrew system (Win2k) and with Hebrew data. Hebrew text is displayed properly in the scrapbook edit window and in the console window. It only happens in Arabic.
Just to clarify: you type System.out.println("hojfhv") in the scrapbook page. * Does the incorrect output show up when you type in the text in the scrabpook page or when you evaluate the expression and the output in the console isn't shown properly? To help us narrow the problem down: * Does the same problem also occur in the Java editor when typing the same statement. * Does the same problem occur in the basic Text editor, e.g. when opening a .txt resource?
reply by Paul Cox in e-mail 1) Yes, you type System.out.println("hojfhv") in the scrapbook page (where hojfv are some Arabic characters). The incorrect output shows up as you type (e.g. the Arabic characters show up as questions marks). I did not run the code to see what the output to the console was. 2) No, the problem does not appear in the Java Editor 3) I have not tried the Text editor, but I will tomorrow. Also, if you change the font in the Preference Dialog to use the System font, the problem goes away. I have been talking with the WS WB folks here in Raleigh. They believe it is a font problem, and we are continuing to investigate that from our end (jfacefont*.properties files). What doesn't make sense to me is why does it works for the Java Editor, not the Scrapbook Editor. Wouldn't they both use the same jfacefont*.properties files? Why would I need a special/different one to make the Scrapbook editor work.
In this case I also suspect a font initialization problem. The scrapbook editor is honoring the font preferences of the Java editor, so the question is the font is initialized. The scrapbook editor is contributed by debug and we need to investigate whether the initial font is set properly (in the same way as the Java editor does it). Moving to debug.
On the 2.0 stream the problem is fixed (from looking at the code). Haven't investigated in the 1.0 code yet, is this PR considered a stop ship?
Yes, this is one of the 4 defects that we are requesting to be fixed on the 1.0 code base.
To answer one of Erich's questions, Arabic characters do display correctly in the Default Text Editor. Sounds like it is just the Java Scrapbook page (.jpage) Editor is having the problem.
ACK we will investigate in a fix (Darin I've adopted the PR again)
I've tried to reproduce the problem on an multilingual version of Win2k. However, I seem to have the problem ('?' when typing arabic text) everywhere, that is the problem is not confined to the scrapbook. I tried to verify that the problem doesn't appear on the Hebrew locale (as mentioned in this PR), but even that doesn't work. Is there anything special when using Eclipse 1.0 on a multilanguage version of Win2k? Last time when I checked I was running a Hebrwe version of WinNT and there everything worked without any special setup.
Since I couldn't get Eclipse to work on Hebrew and Arabic locales on our Win2k system, I tried to reproduce a variant of the problem on the Hebrew version of WinNT. Here Hebrew text worked in the TextEditor as well as the JavaTextEditor but not in the scrapbook. However after selecting a font with Hebrew support in the font preference dialog, any newly created scrapbook showed Hebrew characters correctly. Tracing down the problem showed that the SnippetEditor did not initialize its preference store. As a consequence it would not get the same default font as the other editors but some JFace default font (without Hebrew support). The fix is to initialize the SnippetEditor's PreferenceStore. I don't know whether this fixes the problem with Arabic text, however it will definitely ensure consistent behavior between the scrapbook and editors.
Verified on Hebrew NT 4.0 system. Scrapbook shows Hebrew characters correctly (without having to switch fonts). However, I couldn't not verify whether this fix works in the Arabic locale too.
I have verified that it works on V1 on an Arabic Local. We closed our local defect that matches this one. Thanks-you!