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

Can't type Hebrew into a JTextField under Linux

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      Name: jk109818 Date: 03/05/2002


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

      FULL OPERATING SYSTEM VERSION :
      Linux firebolt 2.4.16 #3 SMP Thu Dec 13 15:29:26 IST 2001
      i686 unknown
      glibc-2.2.90-3
      Red Hat Linux release 7.2 (Enigma)

      ADDITIONAL OPERATING SYSTEMS :


      A DESCRIPTION OF THE PROBLEM :
      This is a repost of report 138411, posted 17-Jan-2002, and
      ignored by you, with additional information.

      Original report:

      Typing hebrew characters into a JTextField produces characters
      in the range \u0ce0+ instead of \u05d0+, which is the
      expected result.

      Additionhal information:

      I encountered the same problem with JDK 1.3.1 for Linux i386
      by a different vendor. The vendor confirmed the problem and
      sent me an updated awt.so which corrected the problem. The
      vendor does not ship 1.4.0 yet, though.

        From my discussions with "the other vendor" it appears that
      this is a very simple fix; you only need to remap the X
      16-bit codes to the unicode 16-bit codes. If you're lucky,
      just a change in some table.

      PLEASE make some response to this. Having only your robots
      to complain to is very frustrating. Six weeks should be more
      than enough to confirm/reject/complain about spelling errors.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Start Linux/KDE2
      2. Start the app below
      3. Switch to a hebrew layout:
           Enable the system tray if not already enabled
              (right click the panel, add, applet, system tray)
           Add the hebrew layout
           Click the keyboard selector to select the hebrew layout
      4. Type 't' a few times into the JTextField. 'T' is the key
      assigned
      to the hebrew character Aleph ('\u05f0')
      5. Cry as the wrong results appear on System.out



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      Expected: a few alephs on the JTextField, and corresponding
      \u5f0 on System.out

      Actual: not-so-funny squares on JTextField, the following on
      System.out:

      test = "" ("")
      test = "?" ("\uce0")
      test = "??" ("\uce0\uce0")
      test = "???" ("\uce0\uce0\uce0")
      test = "????" ("\uce0\uce0\uce0\uce0")





      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      No errors. No exceptions. Just the wrong characters.


      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class Hebrew extends javax.swing.JFrame {

          private javax.swing.JTextField text;

          public Hebrew() {
              text = new javax.swing.JTextField();

              text.addKeyListener(new java.awt.event.KeyAdapter() {
                  public void keyTyped(java.awt.event.KeyEvent evt) {
                      textKeyTyped(evt);
                  }
              });

              getContentPane().add(text, java.awt.BorderLayout.NORTH);

              pack();
      show()
          }

          private void textKeyTyped(java.awt.event.KeyEvent evt) {
              showContent();
          }

          private void showContent() {
              String s = text.getText();
              System.out.print("test = \"" + s + "\"");
              System.out.print(" (\"");
              for (int i = 0; i < s.length(); ++i)
                  System.out.print("\\u" + Integer.toHexString(s.charAt(i)));
              System.out.println("\")");
          }
          
          public static void main(String args[]) {
              new Hebrew().show();
          }
      }


      ---------- END SOURCE ----------

      CUSTOMER WORKAROUND :
      Windows
      (Review ID: 143642)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                yan Yuri Nesterenko
                Reporter:
                jkimsunw Jeffrey Kim (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: