-
Bug
-
Resolution: Cannot Reproduce
-
P1
-
None
-
1.2.0
-
x86
-
windows_95
JDK Version:jdk1.2beta3-J
OS: Win95
Locale: C, zh
In win95, when a string is composed of more than a certain number of unicode which is larger than "\u0800", and it is set to a TextField, an application
error will occur, and win95 will close this application.
==========================CheckWin95.java=====================================
import java.awt.*;
import java.awt.event.*;
public class CheckWin95 {
TextField t;
public static void main(String args[]) {
if (args.length < 2) {
System.out.println("Please input two arguments");
System.exit(0);
}
new CheckWin95(Integer.parseInt(args[0],16),
(new Integer(args[1])).intValue());
}
public CheckWin95(int Z1, int Z2) {
Frame f = new Frame();
t = new TextField(20);
f.add(t);
String data = "";
String single = ""+(char)Z1;
for (int i = 0; i < Z2; i++) {
data = data + single;
}
t.setText(data);
f.pack();
f.setVisible(true);
}
}
=============================================================================
java CheckWin95 0800 2400 error will occur.
java CheckWin95 0800 239 ok
java CheckWin95 0799 240 error will occur
jim.hu@prc 1998-03-06
OS: Win95
Locale: C, zh
In win95, when a string is composed of more than a certain number of unicode which is larger than "\u0800", and it is set to a TextField, an application
error will occur, and win95 will close this application.
==========================CheckWin95.java=====================================
import java.awt.*;
import java.awt.event.*;
public class CheckWin95 {
TextField t;
public static void main(String args[]) {
if (args.length < 2) {
System.out.println("Please input two arguments");
System.exit(0);
}
new CheckWin95(Integer.parseInt(args[0],16),
(new Integer(args[1])).intValue());
}
public CheckWin95(int Z1, int Z2) {
Frame f = new Frame();
t = new TextField(20);
f.add(t);
String data = "";
String single = ""+(char)Z1;
for (int i = 0; i < Z2; i++) {
data = data + single;
}
t.setText(data);
f.pack();
f.setVisible(true);
}
}
=============================================================================
java CheckWin95 0800 2400 error will occur.
java CheckWin95 0800 239 ok
java CheckWin95 0799 240 error will occur
jim.hu@prc 1998-03-06
- relates to
-
JDK-4122022 Check for incorrect use of UTF conversions
- Closed