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

Swing Encodes OS Supported Language Text Incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.2.2
    • 1.2.0, 1.2.2
    • client-libs
    • 1.2.2
    • x86
    • windows_95, windows_nt
    • Verified

      JDK version : JDK1.2 RC2
      Platform : Win32

      The Swing (JDK 1.2 RC2) classes incorrectly encode characters from the
      language that the operating system supports. The result is that Swing
      does not support Arabic on Arabic Windows and does not support Hebrew on
      Hebrew Windows. But it does support Hebrew on Arabic windows and Arabic
      on Hebrew Windows.

      A. Install the Java Plug-in 1.2 for Windows on an Arabic Windows machine.
      B. Install the Java Plug-in 1.2 for Windows on a Hebrew Windows machine.
      C. Download http://sun.tcltek.co.il/windows_classes_1.2RC2/jButton.html.
         This applet has two buttons, one Hebrew and one Arabic.
      D. Note that on the Arabic Windows machine you can only get the correct
         Arabic glyphs to appear using a *Windows* font such as "Courier", but
         without "rabt" (joining). Using a Unicode font results in the Arabic
         in the applet being displayed using a non-Arabic portion of the font,
         but the Hebrew is displayed correctly!.
      E. Note that on the Hebrew Windows machine you can only get the Hebrew
         portions of the applet to appear in Hebrew if you use a *Windows* font,
         which causes the Arabic portions of the applet to not be displayed. If you
         us a Unicode font, the Hebrew is displayed incorrectly but the Arabic is
         fine, including correct joining!

      It appears to me that there is an extraneous "if" statement in the Swing
      classes that changes the character encoding to the encoding supported by
      the OS if the OS supports the language of the characters. This should not
      happen. Swing classes should tread ALL languages as "foreign" to the
      operating system and use the Unicode support without changing the
      character encoding.

      "Unless I'm making a very stupid mistake this is a show stopper. It is
      hard for me to believe that it hasn't been reported before. I bet that
      Waleed has seen it. Please verify it as soon as possible and get back to me." quote from Jonathan Ben-Avraham's email

            bcbeck Brian Beck (Inactive)
            cjaosunw Cindy Jao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: