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

java.awt.choice is not able to display unicode charecters like \u2019

    XMLWordPrintable

Details

    • x86
    • windows_2000

    Description

      FULL PRODUCT VERSION :
      java version "1.4.2_11"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_11-b06)
      Java HotSpot(TM) Client VM (build 1.4.2_11-b06, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      windows 2000

      A DESCRIPTION OF THE PROBLEM :
      java.awt.Choice , java.awt.List , java.awt.Button not able to display unicode charecters like \u2018, \u2019 .

      NOTE: java.awt.TextField can display those charecters.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Please run the Sample Program.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      choice , List , Button should not show Garbage(square).
      It has to show corresponding unicode charecter.
      please see the TextField for actual output
      ACTUAL -
      Garbage charecters are displayed instead of actual charecters.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      import java.awt.*;
      import java.applet.*;


      public class TestUnicode {

        public static void main(String[] args) {

      Frame f = new Frame();
      Button b = new Button( "\u2019 = \\u2019 \u2018 = \\u2018");
      List l = new List();
      Choice ch = new Choice();
      f.setLayout(new FlowLayout());
      ch.addItem("\u2019 = \\u2019");
      ch.addItem("\u2018 = \\u2018");
      l.addItem("\u2019 = \\u2019");
      l.addItem("\u2018 = \\u2018");
      TextField e = new TextField("\u2019 = \\u2019 \u2018 = \\u2018");
      f.add(e);
      f.add(ch);
      f.add(b);
      f.add(l);
      f.pack();
      f.show();
        }
      }

      Attachments

        Issue Links

          Activity

            People

              yan Yuri Nesterenko
              dav Andrei Dmitriev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Imported:
                Indexed: