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

b24,wrong characters displayed in JTextcomponents for keyboard input RTL chars

    Details

    • Subcomponent:
    • Resolved In Build:
      b28
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: jbT81659 Date: 10/22/2003

      Build:
          j2sdk-1_5_0-beta-bin-b24-windows-i586-15_oct_2003
      Platforms:
          Windows 98 2nd Editition (ar_SA),
          Windows 98 (iw_IL)
          Windows 2000 (iw_IL)
          Windows XP-prof (iw_IL)
          Windows XP-home (en_US)

      Regression: Yes
      Build: b24


      Detailed Desribtion

      Under Windows 98 2nd edition Arabic, and Windows 98 Hebrew, inserting an RTL character from the keyboard into a Jtextcomponent fails to display the correct RTL character defind by the JDK default keymap. Instead of displaying the corresponding RTL character, a gibberish character is displayed.

      We conducted additional testing of the the following builds under Windows 98 Arabic 2nd Edition and Windows 98 Hebrew:
      b09, b10, b12, b14, b18, b20, b22

      b09 and b10, the bug does not exist
      b12, b14 java fails to execute test cases with the following errors

      E:\javaLab\tiger\standard>java jTextField
      Exception in thread "main" java.lang.NullPointerException
      )at java.awt.Window.init(Window.java:247
      )at java.awt.Window.<init>(Window.java:275
      )at java.awt.Frame.<init>(Frame.java:401
      )at javax.swing.JFrame.<init>(JFrame.java:198
      )at jTextField.main(jTextField.java:20
      and then the java command freezes.


      b18 java fails to execute test cases with the following errors:
      ---------------------------------------------------------------------------------------------------
      E:\javaLab\tiger\standard>java jTextField
      Exception in thread "main" java.lang.UnsatisfiedLinkError: F:\builds\jdk\win32\j
      ??????? ?????? ?????? ???? ???? :re\bin\awt.dll
      )at java.lang.ClassLoader$NativeLibrary.load(Native Method
      )at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560
      )at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477
      )at java.lang.Runtime.loadLibrary0(Runtime.java:788
      )at java.lang.System.loadLibrary(System.java:862
      )at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50
      )at java.security.AccessController.doPrivileged(Native Method
      )at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38
      )at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29
      )at java.awt.Component.<clinit>(Component.java:538

      ---------------------------------------------------------------------------------------------------


      b20 and b22, the bug exists

      To reproduce the bug:

      1.Login to a native Windows 98 Arabic or Hebrew machine
      2.Verify that jdk1.5.0-b24 is installed on that machine (java -version)
      3.Compile the following testcase jTextField.java (javac jTextField.java)
      4.Execute the jTextField testcase (java jTestField)
      5.Use the "ALT+SHIFT" to switch between input languages
      6.Insert English characters into any textfield
      7.Verify that displayed characters are correct
      8.Insert Hebrew or Arabic characters
      9.Verify that wrong ( gibberish) characters are displayed

       -----------------------------------------------------------------------------------------------------------------

      /* Copyright (c) Sun Microsystems 1998

      $Header: /home-bazelet/sun/src/javaLab/JDK1.4/standard/jTextField.java,v 1.1.1.1 2001/06/19 15:01:31 isam Exp $

      */

      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.*;

      public class jTextField extends JApplet
      {
      public void init()
      {
      textAAA text = new textAAA();
      getContentPane().add(text);
              }
      public static void main(String[] argv)
      {
                      JFrame frame = new JFrame("\u0645\u062b\u0627\u0644");
           frame.setContentPane(new textAAA());
           frame.pack();
           frame.setVisible(true);
              frame.addWindowListener( new WindowAdapter()
              {
                   public void windowClosing( WindowEvent e)
                   {
                       System.exit(0);
                   }
              });

      }
      }
      class textAAA extends JPanel
      {
              JTextField tf0,tf1,tf2,tf3,tf4,tf5,tf6,tf7,tf8,tf9,tf10;
      public textAAA()
      {
                      setLayout(new GridLayout(12,1));

                      JTextField tf0 = new JTextField(30);
                      //tf0.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf0.setText("\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      //tf0.setHorizontalAlignment(JTextField.LEFT);
                      add(tf0);

                      JTextField tf1 = new JTextField(30);
                      //tf1.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf1.setText("\u0067\u062a\u0641\u0627\u062d\u0020\u0623\u062d\u0645\u0631\u0020\u0643\u0628\u064a\u0631");
                      //tf1.setHorizontalAlignment(JTextField.RIGHT);

                      add(tf1);

                      JTextField tf2 = new JTextField(30);
                      //tf2.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf2.setText("\u0648\u0644\u062f\u0020\u0635\u063a\u064a\u0631\u0020\u006c\u0069\u006d\u0065\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u0648\u062c\u0645\u064a\u0644");
                      //tf2.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf2);

                      JTextField tf3 = new JTextField(30);
                      //tf3.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf3.setText("\u0067\u0647\u0630\u0627\u0020\u064a\u0648\u0645\u0020\u0644\u0637\u064a\u0641\u0020\u05d6\u05d4\u0020\u05d9\u05d5\u05dd\u0020\u05e0\u05e2\u05d9\u05dd");
                      //tf3.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf3);

                      JTextField tf4 = new JTextField(30);
                      //tf4.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf4.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4");
                      //tf4.setHorizontalAlignment(JTextField.LEFT);
                      add(tf4);

                      JTextField tf5 = new JTextField(30);
                      //tf5.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf5.setText("\u05d6\u05d5\u0020\u05e9\u05e0\u05d4\u0020\u05d9\u05e4\u05d4\u0020\u0054\u0048\u0045\u0020\u0059\u0045\u0041\u0052\u0020\u0031\u0039\u0035\u0038");
                      //tf5.setHorizontalAlignment(JTextField.CENTER);
                      add(tf5);

                      JTextField tf6 = new JTextField(30);
                      //tf6.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
      tf6.setText("\u05d7\u05d5\u05de\u05d5\u05e1\u0020\u0069\u0073\u0020\u0067\u0072\u0065\u0065\u006e\u0020\u05d9\u05e7\u05e8\u006c\u0069\u006d\u0065");
                      //tf6.setHorizontalAlignment(JTextField.CENTER);
                      add(tf6);


                      JTextField tf7 = new JTextField(30);
                      //tf7.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
                      //tf7.setHorizontalAlignment(JTextField.LEFT);
                      add(tf7);

                      JTextField tf8 = new JTextField(30);
                      //tf8.setFont(new Font("Lucida Sans Regular",Font.PLAIN,14));
                      //tf8.setHorizontalAlignment(JTextField.RIGHT);
                      add(tf8);
         }
      }


       -----------------------------------------------------------------------------------------------------------------
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              naoto Naoto Sato
              Reporter:
              jbenavrasunw Jonathan Benavraham (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: