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

Leading combining diacritic character in string renders incorrectly

XMLWordPrintable

    • b14
    • generic
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      A string with a leading combining diacritic (https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) will render improperly in jshell

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Open a new jshell instance and create a string with a leading combining diacritic

      jshell> "\u032Ea"

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      jshell should visually separate the double-quotation mark from the string's actual contents

      $1 ==> "‌̮a"

      This can be done either by unconditionally emitting a zero-width, non-joiner (\u200C) or by detecting the presence of a leading combining diacritic in a string and conditionally emitting the zero-width, non-joiner.
      ACTUAL -
      The diacritic has combined with jshell's double-quote mark.

      $1 ==> "̮a"

      FREQUENCY : always


        1. Linux.png
          32 kB
          Anupam Dev
        2. Screen Shot 2022-05-10 at 12.55.00 PM.png
          26 kB
          Michel Trudeau
        3. Windows.png
          12 kB
          Anupam Dev

            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: