Closed Bug 136103 Opened 24 years ago Closed 23 years ago

Mozilla can't display ChineseChar passed as parameters to Applet

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 99047

People

(Reporter: yanxb, Assigned: joe.chou)

Details

My system: Mozilla 0.99 Sun Java SDK 1.3.1_02 Sun JVM plugin 1.3.1_02 Linux Chinese RedFlag My Application: An Applet is used to display a button implemented by AWT button. The label characters on Button are Chinese characters which are passed to the applet as PARAM defined in HTML. Phenomena(Unexpected Result): The Chinese Character on Button display incorrect, always with Square box or other strange character. Other Observation: When this same applet is rendered by appletviewer, Chinese character can be displayed correctly. Note: the Java SDK containing appletviewer is the same version of 1.3.1_02 as JVM plugin in Mozilla.
Reporter: Please set a more appropriate severity level. "Critical" is for "crashes, loss of data, severe memory leak". Thank you for using Bugzilla!
This bug also happen on Solaris. Chinese Char can be displayed on Windows 2000. Mozilla first convert Chinese Char(GB2312) to Unicode and then send the unicode parameters to JVM through JPI. I think it relate to Encoding. On Unix, Add the following code into Applet, it can get right unicode parameter. String param = ""; try { String temp = getParameter(name); //name is the key of parameter BufferedReader reader = new BufferedReader(new InputStreamReader( new StringBufferInputStream(temp), "UTF-8")); param = reader.readLine(); } catch (Exception e) { } I will go on investigate this bug.
This workround works! Thanks, Joshua.
The following workround also works, and it avoid using deprecated "StringBufferInputStream" class. String param = null; try { String temp = getParameter(name); //name is the key of parameter param = new String(temp.getBytes(), "UTF-8"); } catch (Exception e) { }
This bug has been fixed on JPI side Please close this bug ---------SCERI---------------------
closing as FIXED .. based on comment #5 (I think it's appropriate to close this bug as fixed in this case)
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Both suggested workarounds do not look good for me because in this case applet likely will not work with plugin that correctly support param attributes. (And we can not force all applet authors to rewrite their applets ...) Which version of java plugin fixes the problem? 1.4.1? Could you please post here bugtraq id to verify? I would prefer to have this bug open at least until jre that fixes this become available.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Moving to OJI
Status: UNCONFIRMED → NEW
Component: Java-Implemented Plugins → OJI
Ever confirmed: true
to component owner
Assignee: idk → joe.chou
QA Contact: avm → pmac
It's really good idea to check bugzilla for existing bugs before opening new one. It can save time to you and others. Closing as dup of bug 99047 *** This bug has been marked as a duplicate of 99047 ***
Status: NEW → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
Chris Petersen is a new QA contact for oji component. His email is: petersen@netscape.com
Assignee: joe.chou → petersen
reopen
Status: RESOLVED → REOPENED
QA Contact: pmac → petersen
Resolution: DUPLICATE → ---
assigned to joe chou
Assignee: petersen → joe.chou
Status: REOPENED → NEW
dup of bug: 99047 *** This bug has been marked as a duplicate of 99047 ***
Status: NEW → RESOLVED
Closed: 24 years ago → 23 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.