Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4133485

Can't draw non-ASCII characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 1.1.4, 1.2.0
    • client-libs
    • 2d
    • generic, x86, sparc
    • generic, solaris_2.5.1, windows_95, windows_nt

    Description

      Run the application FontTest (see below) on a JDK with the changes put back by the 2D team on 1998.04.28, and in the Japanese locale. The application should draw a string containing the German sharp-s character, small and full-size Japanese hiragana-a characters, and "abc", each one several times. Only the "abc" is drawn as itself, all the non-ASCII characters are rendered as random ASCII characters.

      The application works fine on the JDK-1.2beta4-C build.

      ---------------------------------------------------------------
      import java.awt.*;
      import java.awt.event.*;
      import java.text.*;

      public class FontTest extends Frame {

          public FontTest() {
              setTitle("Font Test");
              setSize(400, 400);
              add(new FontTestCanvas(), "North");
              show();
              getComponent(0).requestFocus();
          }

          public static void main(String argv[]) {
              FontTest test = new FontTest();
          }
      }

      class FontTestCanvas extends Canvas {

          FontTestCanvas() {
              super();
      setSize(300, 80);
      setBackground(Color.cyan);
      setVisible(true);
      setEnabled(true);
          }
          
           public void paint(Graphics g) {
              super.paint(g);
      g.setColor(getForeground());
      g.drawString("\u00df\u3041\u3042\u00df\u3041\u3042\u00df\u3041abc\u3042\u00dfabc", 5, 15);
          }
          
      }

      Attachments

        Issue Links

          Activity

            People

              pcharltosunw Paul Charlton (Inactive)
              nlindenbsunw Norbert Lindenberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: