-
Bug
-
Resolution: Fixed
-
P1
-
1.2.0
-
1.2beta2
-
generic, sparc
-
solaris_2.5.1, windows_nt
-
Verified
JDK1.2 failed to display MultiCharsetString correctly on Win32,
The following sample shows the problem.
(1)Substitute "JAPANESE" by a not 8859-1 string
(2)Run sample under not-English version of Win32 envirenment.
import java.awt.*;
public class sample {
public static void main( String[] args ) {
createa();
}
static void createa () {
Frame a=new Frame("Test");
TestCanvas tc = new TestCanvas();
a.setLayout(new BorderLayout());
tc.setSize(100, 100);
//substitute JAPANESE to any no-ASCII string
tc.setText("abcd" + "JAPANESE" + "efgh");
a.add("Center", tc);
a.pack();
a.show();
}
}
class TestCanvas extends Canvas {
String s;
public TestCanvas() {
super();
}
public void setText(String st) {
s = new String(st);
repaint();
}
public void paint(Graphics g) {
g.drawString(s, 0, 20);
}
}
The following sample shows the problem.
(1)Substitute "JAPANESE" by a not 8859-1 string
(2)Run sample under not-English version of Win32 envirenment.
import java.awt.*;
public class sample {
public static void main( String[] args ) {
createa();
}
static void createa () {
Frame a=new Frame("Test");
TestCanvas tc = new TestCanvas();
a.setLayout(new BorderLayout());
tc.setSize(100, 100);
//substitute JAPANESE to any no-ASCII string
tc.setText("abcd" + "JAPANESE" + "efgh");
a.add("Center", tc);
a.pack();
a.show();
}
}
class TestCanvas extends Canvas {
String s;
public TestCanvas() {
super();
}
public void setText(String st) {
s = new String(st);
repaint();
}
public void paint(Graphics g) {
g.drawString(s, 0, 20);
}
}
- duplicates
-
JDK-4092076 The IM enabled client displays some symbols after a characater is committed
-
- Closed
-