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

[macos] Wrong chars emitted when entering certain char-sequence of Indic language

    XMLWordPrintable

Details

    • 2d
    • b08
    • aarch64
    • os_x

    Description

      ADDITIONAL SYSTEM INFORMATION :
      MacOS Monterey 12.0.1 (21A559)

      A DESCRIPTION OF THE PROBLEM :
      javax.swing.* and java.awt.* emits wrong chars when entered specific allowed char-combination of Indic languages (especially sanskrit)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      In any JTextField or TextField, try entering valid sanskrit Consonant combination like 'स्तु' using MacOS inbuilt 'Devanagari QWERTY' keyboard.

      Correct keys to get 'स्तु' (in Safari browser/etc) -- where there is no bug:
      s f t u

      Bug exists in JDK java.swing|awt.*.
      If one enters above char-sequence ' s f t u' , JTextField shows 'स््ु' -- which is is wrong.

      To get correct char-sequence, one needs to type two DELETE-key-strokes and type again 't u' , which now emits correct key-combo 'स्तु' in JTextField/TextField



      ---------- BEGIN SOURCE ----------
      /* Below case sample swing TextField app. In which , one needs to type above char-sequence to get the bug reproduced */
      package org.gvn;
      import javax.swing.*;
      public class Main {
          public static void main(String[] args) {
              JFrame f=new JFrame();//creating instance of JFrame
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JTextField b=new JTextField("click");
              b.setBounds(130,100,100, 40);

              f.add(b);

              f.setSize(400,500);
              f.setLayout(null);
              f.setVisible(true);

          }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


      Attachments

        1. Capture.PNG
          Capture.PNG
          36 kB
        2. KeyEventDemo.java
          6 kB
        3. Main.java
          0.4 kB

        Issue Links

          Activity

            People

              psadhukhan Prasanta Sadhukhan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: