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

Unable to enter zero width non-joiner (ZWNJ) symbol in Swing text component

    XMLWordPrintable

Details

    • b23
    • windows

    Backports

      Description

        FULL PRODUCT VERSION :
        JDK 8 or later release family, JDK 7, JDK 6

        ADDITIONAL OS VERSION INFORMATION :
        MS Windows 10 OS

        A DESCRIPTION OF THE PROBLEM :
        Zero width non-joiner (ZWNJ) character cannot be entered in Swing text components using Persian keyboard layout, while it can successfully be entered in AWT text components.

        To confirm that the problem is with input of ZWNJ character and not its rendering, a correct text entered in AWT text component can be copied and inserted into Swing text component, where it will be displayed also correctly.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Compile and run the attached test case "ZeroWidthNonJoinerCharCannotBeEntered.java" with JDK to be tested.
        2. Set "Persian" keyboard layout.
        3. Perform the following sequence of keyboard input events both in any AWT text component and in any Swing text component on the window shown by the test case:
        - press 'q' button, press Ctrl+Shift+2, press 'q' button again.

        The bug is reproduced, if the text entered in Swing text component differs from the text in AWT text component assuming that the text in AWT text component is correct.
        Correct text: "ض‌ض"
        Incorrect text: "ضض"

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: