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

Incorrect rendering of Unicode joiner in Sinhala example

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6u26
    • client-libs
    • 2d
    • x86
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.6.0_25"
      Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
      Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      A certain example of Unicode on the web had an example of how the zero width joiner can actually make a semantic difference. I constructed a test in Java to see what would happen, and the result was failure to render the text correctly.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached example.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The joiner should be handled, so the whole thing should appear as a single stacked character.
      ACTUAL -
      The two halves split, rendering incorrectly.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import javax.swing.JOptionPane;

      public class Test
      {
          public static void main(String[] args) throws Exception
          {
              String string = "\u0DC1\u0DCA\u200D\u0dbb\u0dd3";
              JOptionPane.showMessageDialog(null, string);
          }
      }

      ---------- END SOURCE ----------

            dgredler Daniel Gredler
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: