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

Problem with danish characters in TextField

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • client-libs
    • x86
    • linux

      Name: rmT116609 Date: 12/12/2003


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

      java version "1.4.2_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
      Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux <REMOVED> 2.4.20-20.9 #1 Mon Aug 18 11:37:49 EDT 2003 i686 i686 i386 GNU/Linux


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

      A DESCRIPTION OF THE PROBLEM :
      It is not possible to enter danish characters (e.g. ?, ? and ?) in a java.awt.TextField when the echo character is set. It works fine without the echo character set. Moreover, it is not possible to type new characters in the text field when a danish character has been entered.

      The additional danish characters are ?, ? and ?.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      See the attached test program.

      1. compile the applet
      2. start the applet using e.g. a browser
      3. type something in the text field
      4. set the echo character, try to type in a danish character
      5. when one danish character has been entered is not possible to enter any more characters

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      That is should be possible to enter danish characters in a TextField with the echo character set.
      ACTUAL -
      Once a danish character has been entered, it is not possible to enter more characters (even if these are english).

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.applet.Applet;
      import java.awt.Button;
      import java.awt.TextField;
      import java.awt.event.ActionEvent;
      import java.awt.event.ActionListener;

      public class DanishChar extends Applet implements ActionListener
      {
      private TextField ivTf;
      private Button ivBtn;

      public void init()
      {
      super.init();

      ivTf = new TextField("", 25);
      add(ivTf);

      ivBtn = new Button("Toggle echo");
      ivBtn.addActionListener(this);
      add(ivBtn);

      setSize(300, 100);
      }

      public void actionPerformed(ActionEvent pAe)
      {
      if (ivTf.echoCharIsSet()) {
      ivTf.setEchoChar((char)0);
      }
      else {
      ivTf.setEchoChar('*');
      }
      ivTf.setText(ivTf.getText());
      }
      }

      ---------- END SOURCE ----------
      (Incident Review ID: 228250)
      ======================================================================
      ###@###.### 2004-03-11

            kdmsunw Kdm Kdm (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: