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

[macos] Mongolian characters and Yi Syllables are displayed as rectangles

XMLWordPrintable

    • 2d
    • b01
    • os_x

      ADDITIONAL OS VERSION INFORMATION :
      macOS 10.15.4, macOS 10.14.6

      A DESCRIPTION OF THE PROBLEM :
      If characters from Mongolian and Yi Syllables Unicode code ranges are entered to a text component, they are displayed correctly until a character from Tibetan or Arabic Unicode code range is entered after them. After that moment Tibetan or Arabic character is displayed properly, while all preceding Mongolian characters or Yi Syllables become displayed as rectangles.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Go to "System Preferences -> Keyboard -> Input Sources" and add "Unicode Hex Input".
      2. Compile and run the test case, whose code is provided below.
      3. Press and hold Option (Alt) key and type "1821a008", then:
      - for the test scenario #1 type "0f11" and release Option key. "1821" - Tibetan character.
      - for the test scenario #2 type "062e" and release Option key. "062e" - Arabic character.

      The bug is reproduced, if first two characters "1821a008" are displayed as rectangles, for example as it is on the attached screenshot "IncorrectCharactersWithJDK8u261b12OnMacOS10.15.6.png", where JDK 8u261 b12 was used on macOS 10.15.6. The bug is not reproduced, if all three characters are displayed correctly, for example as it is on the attached screenshot "CorrectCharactersWithJDK8u161b12OnMacOS10.15.6.png" on which JDK 8u161 b12 was used.

      ---------- BEGIN SOURCE ----------
      import java.awt.BorderLayout;
      import java.awt.Container;
      import javax.swing.JFrame;
      import javax.swing.JTextField;
      import javax.swing.SwingUtilities;

      public class TestCase {
          public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                  @Override
                  public void run() {
                      JFrame f = new JFrame("TestCase for JDK-8246036");
                      Container c = f.getContentPane();
                      c.setLayout(new BorderLayout());

                      JTextField textField = new JTextField(15);
                      c.add(textField, BorderLayout.CENTER);

                      f.pack();
                      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                      f.setVisible(true);
                  }
              });
          }
      }
      ---------- END SOURCE ----------

            alitvinov Anton Litvinov (Inactive)
            shadowbug Shadow Bug
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: