Bug 8867 - Scrapbook Files displays Arabic characters as question marks
Summary: Scrapbook Files displays Arabic characters as question marks
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Erich Gamma CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-31 14:47 EST by Paula Cox (WSAD) CLA
Modified: 2002-02-26 00:31 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paula Cox (WSAD) CLA 2002-01-31 14:47:24 EST
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.
Comment 1 Erich Gamma CLA 2002-01-31 16:27:07 EST
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?
Comment 2 Erich Gamma CLA 2002-02-01 08:01:43 EST
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.
Comment 3 Erich Gamma CLA 2002-02-01 08:04:18 EST
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.
Comment 4 Erich Gamma CLA 2002-02-01 08:57:32 EST
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?
Comment 5 Paula Cox (WSAD) CLA 2002-02-01 10:25:26 EST
Yes, this is one of the 4 defects that we are requesting to be fixed on the 1.0 
code base.
Comment 6 Paula Cox (WSAD) CLA 2002-02-01 13:34:41 EST
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.
Comment 7 Erich Gamma CLA 2002-02-01 20:38:49 EST
ACK we will investigate in a fix (Darin I've adopted the PR again)
Comment 8 Andre Weinand CLA 2002-02-08 04:29:00 EST
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.
Comment 9 Andre Weinand CLA 2002-02-08 09:19:49 EST
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.

Comment 10 Andre Weinand CLA 2002-02-13 07:43:32 EST
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.
Comment 11 Paula Cox (WSAD) CLA 2002-02-26 00:31:40 EST
I have verified that it works on V1 on an Arabic Local. 
We closed our local defect that matches this one.
Thanks-you!