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

Jshell can't recognize non-ascii content when paste in shell

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      Arch Linux, kernel 5.13 ,openjdk 16.0.2 2021-07-20


      A DESCRIPTION OF THE PROBLEM :
      Jshell can't recognize non-ascii paste content, though Java encoding was set to UTF-8. if I type some non-ascii character, it work fine, but when i paste, all non-ascii utf-8 content become U+FFFD �

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      open a terminal, eg. konsole
      run jshell
      copy some content with utf-8 non-ascii character, like
      System.out.println("中文")
      paste it to jshell
      you can see the non-ascii content become U+FFFD �

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      System.out.println("中文")
      ACTUAL -
      System.out.println("����")

      ---------- BEGIN SOURCE ----------
      System.out.println("中文")
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Arch Linux, kernel 5.13, openjdk 16.0.2 2021-07-20


      FREQUENCY : always


            adev Anupam Dev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: