Closed Bug 59433 Opened 24 years ago Closed 24 years ago

Japnese characters not displayed properly in applet.

Categories

(Core :: Internationalization, defect, P3)

Sun
Solaris
defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: nasiruddin.shaikh, Assigned: xiaobin.lu)

References

()

Details

(Keywords: intl, Whiteboard: suntrak-n6; Unix/JDK bug (by Xiaobin Lu 2000-12-12))

Attachments

(4 files)

Netscape build id: 10/31/2000 Platform : Solaris2.8(sparc) Please see the bug-id : 17169 The above url doesn't display the the japanese characters in html and applet properly. I tested on SOLARIS platform.
The page is Shift_JIS but the charset is not specified by META. Did you set character coding to Shift_JIS or enabled Japanese auto detection?
When i manually change the encoding to japanese, it displays the html japanese characters properly. But still the characters in the applets are not displayed properly.
Cc to i18n people. Bob, is there know i18n Java problem?
This does not happen in Win32 build. Mac has same problem - 55585. I cannot get java work in Linux.
Reassign to the OJI person.
Assignee: nhotta → edburns
Whiteboard: suntrak-n6
I could reproduce this in 11-06-16 MN6 Linux build on Redhat 6.2J. I have test cases in http://babel/java Japanese characters are displayed correctly in the first 5 applet which included Japanese characters in the applet. The test cases below the "Japanese Text" which are similar cases as above are not displayed Japanese characters correctly.
Hi Xiaobin, can you please test this? Thanks, Ed
Assignee: edburns → xiaobin.lu
Reassign this bug to myself! Xiaobin
The japanese character in this webpage is Shift_JIS.If you enable this kind of character, the japanese character can be displayed correctly while the character in the applet CAN NOT be displayed correctly.
Summary: Japnese characters not displayed properly. → Japnese characters not displayed properly in applet.
George, this is one of the bugs Bob Jug was telling you about. We need help in debugging where the font info is fed from and where it is failing. I played around with "font.properties.ja" file and observed the following: 1. The original problem is that the Japanese characters on on the test applet and others look like small squares. This seems to be the default fallback character thrown up by Java when a glyph is not found, i.e. \u274F. 2. Uncommenting font aliasing lines had no change in effect. 3. Changing font orders or names of the fonts to others that exist on my system (RH 6.2-Japanese) had no effect. 4. Interestingly, changing the default font: default.char=274f to an ASCII character like "Z" (\u005A) had no effect. I still see only small squares. These lead me to believe that 1. Either, the correct font properties file is not found or used at all, 2. Or proper Unicode values are not passed on to the VM that matches the fonts specified in the font prop file.
We need help in assessing if this is something we can fix during L10n process or something we can fix after the product has shipped with a replacement of a file or something and without modifying the binary itself. As we arree preapring localized builds for NS6, your quick assessment is highly appreciated.
Added myself to cc list.
I have tried the applet which has chinese characters and it works. I don't know whether the applet has some resource bundle classes attached with it or not. If the applet class used some resource bundle classes which does not exisits, of course the font will not be shown correctly.
I am sorry for the last comment I made, it is totally misleading and confusing. After several tries, I have made it work in my system. First I uninstalled the jre installed in my system because I am afraid it was obsolete. I went to http://java.sun.com/products/jdk/1.3.0(or http://java.sun.com/products/jdk/1.3.0_01)to downloaded the latest bits and installed it in my system. Two things are necessary to make the japanese font in applet work. 1. Know what's the JRE you are using. To know this, open the java console panel in the system control panel. Click the JRE tab and select the JRE directory you will use to run java application. For example I selected to use c:\Program Files\javasoft\jre\1.3.0_01. 2. Go to the directory that you have selected and your will find a lib sub directory in the JRE directory(make sure the lib is under jre directory). Make a back up to the font.properties which is default selected by javasoft. Change the "font.properties.ja" to "font.properties". ( If you want display chinese font, change the "font.properties.zh" to "font.properties".) Go to <http://www.hitsuji.to/ScrooString1.html> to test the effect. I strongly suggest that the webpage should use Japanese(Shift-JS) as the default font so we don't need to manually select the character encoding tab in the view menu as Japanese(Shift-JS). I would like your guys can test it and if it is ok, I will change the bug status as fixed.
Oops, I am wrong. It works in Win32 and it does not work for solaris.
We are aware of the things you mention above on Unix. The Windows platform is not a problem for us, The problems to be addressed include the following: 1. Does setting the locale correctly (ja, ja_JP, etc.) make Java select the correct font.properties.xx file. 2. Is the font.properties.xx file being used at all. (There is some doubt that it is being used -- see my comment above.) 3. Mozilla sets certain variables when it starts up, e.g. MOZILLA_HOME. Is there any special variblae that needs to be set for Java/JRE to work. Also please make sure that Japanese applets at the above URL works OK on Solaris with the latest Mozilla build under a Japanese locale with latest JRE. It seems that your finding indicates that ir does not. That is exactly what we found on Linux. We need to pout this through a debugger to see where the font display is failing.
For windows, to make japanese font to work, I noticed that we need to download and install the japanese font from win2000 cd or from microsft website. I suspect that we should install the language pack for japanese to make it work. I am now trying to contact the person who knows where to get that language pack. Have you tried to install the japanese language support for solaris? Try it and I think it will work.
It's not the font issue on Linux. Linux 6.2-Japanese comes with standard Japanese fonts for the platform. font.properties.ja file lists the fonts for that system. Are you using a debugger? Can anyone debug this and see where the failure is occurring?
Currently, I don't have a debug build mozilla in solaris. I think the font.properties.ja file is not used in a right way. After I have installed the Japanese font in solaris, it still does not work. Just like Momoi suggest, can anyone who has the debug build of mozilla to investigate this bug? Thanks in advance!
Copying Jim Melvin on this bug. Jim, has anybody in your group or Java Software SQE that you know of, tried Japanese locale for Solaris? Our group hasn't tried this (Netscape 6 Solaris QA), I'm afraid.
I checked out the source from trunck and build it. When I went to java.sun.com, the browser is crashed. I was blocked. I will try to check out the code from branch and see what happens.Based on Ed's suggestion, I would like to mark the status of this bug as OJI_WAITING.
Hi,Momoi: Could you set LANG to ja and then use appletviewer to test the test case I posted? In my solaris, it does not work. I want to see whether it works on your machine or not. Thanks! Xiaobin
*** Bug 62090 has been marked as a duplicate of this bug. ***
Bug 62090 has Latin 1 examples for Unix. When this bug is fixed, we should look at the test case in Bug 62090.
I have gone many websites which have some applets which show some japanese characters. In Unix, I installed all the necessary Japanese fonts like ja_JP.PCK. However, it still does not show the japanese characters. More interesting thing is there is a website: http://www1.odn.ne.jp/~etsuko/tenmon/ver1/seiza.html It has a japanese applet and it can show the Japanese charcter correctly. This also proves that my system has the necessary fonts to show the Japanese. The bad thing is this website does not provide the source code to let me hack. Use appletviewer also does not work. I think it is a JDK bug in Unix and I will file this bug to JDK group.
Adding Tao to cc-list
Whiteboard: suntrak-n6 → suntrak-n6; Unix/JDK bug (by Xiaobin Lu 2000-12-12)
I have filed a JDK bug in bugtraq( an internal bug track system). The bug id is 4397754.
Keywords: intl, nsbeta1
Status: NEW → ASSIGNED
FTang - Since this is Solaris, should we remove the nsbeta1 and intl keywords???
Jaime, this is a general Unix bug -- Solaris is mentioned as only one of the platforms. But the problem also occurs with Linux. Xiobin, I think we need to consider the possibility that font "aliasing" may not be working on Unix. I believe that most it not all applets on: http://www.hitsuji.to/ScrollString1.html uses legacy font names like "times roman". Thus, aliasing has to be working properly to display Japanese characters. If the applet at: http://www1.odn.ne.jp/~etsuko/tenmon/ver1/seiza.html displays Japanese OK, then it may be using the generic names supported by JDK 1.2 and later. Note: Aliasing is working on Windows.
Momoi: I reported your concern to the bugtraq(an internal bug track software). I haven't seen any fix or workaround of the bug I reported weeks ago.
I received response from java.awt team. They told me that "timesroman", "helvetica" or "courier" are not encouraged after jdk1.0 and we should use logica font name instead. On Unix,if the physical fonts with these names are installed(it should always be the case), they will be mapped to these three physical fonts, which means you will try to use an English font to display Japanese or other characters, this is actually happened here. Bascically I don't have the source code of the scroll string, so I can not dig into the code to change the fonts which may hardcoded in the code. But I can confirm what they told me by looking at website : http://www1.odn.ne.jp/~etsuko/tenmon/ver1/seiza.html which has Japanese character in the applet and can shown in Solaris well and the applet didn't use the three fonts I mentioned. I beleive this bug is jdk backward compatible problem and just like some applets which compiled using jdk version before 1.0 and they can not be shown in current browser. I would like to mark this bug as WONTFIX.
Mark this bug as WONTFIX. Reopen if any problem happens.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
*** Bug 71033 has been marked as a duplicate of this bug. ***
Verified as wonfix.
Status: RESOLVED → VERIFIED
Attached file font.properties file
Attachments, ID 34453 and 34454 are from 2001051412 Linux build.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: