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)
Tracking
(Not tracked)
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.
Comment 1•24 years ago
|
||
Reporter: Please set a more appropriate severity level. "Critical" is for
"crashes, loss of data, severe memory leak". Thank you for using Bugzilla!
Comment 2•24 years ago
|
||
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.
| Reporter | ||
Comment 3•24 years ago
|
||
This workround works! Thanks, Joshua.
Comment 4•24 years ago
|
||
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) {
}
Comment 5•24 years ago
|
||
This bug has been fixed on JPI side
Please close this bug
---------SCERI---------------------
Comment 6•24 years ago
|
||
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
Comment 7•24 years ago
|
||
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 → ---
Comment 8•24 years ago
|
||
Moving to OJI
Status: UNCONFIRMED → NEW
Component: Java-Implemented Plugins → OJI
Ever confirmed: true
Comment 10•24 years ago
|
||
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
Comment 11•23 years ago
|
||
Chris Petersen is a new QA contact for oji component. His email is:
petersen@netscape.com
Assignee: joe.chou → petersen
Comment 12•23 years ago
|
||
reopen
Status: RESOLVED → REOPENED
QA Contact: pmac → petersen
Resolution: DUPLICATE → ---
Comment 14•23 years ago
|
||
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
You need to log in
before you can comment on or make changes to this bug.
Description
•