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

substring in XSLT returns wrong character if string contains supplementary chars

    XMLWordPrintable

Details

    • b59
    • Verified

    Backports

      Description


        substring() in XSLT stylesheet returns wrong character when string contains
        UNICODE's supplementary characters.

        For example, an UNICODE supplementary character, '𠀋' (codepoint is
        U+2000B), is one length character but substring('𠀋ABC', 3, 1)
        returns the second character, 'A', although the third character, 'B', is
        expected to be returned.

        A similar issue existed in string-length() and it was fixed in JDK-8032909.
        So, string-length('𠀋') returns 1 as the supplementary character's
        length correctly on jdk with the fix of JDK-8032909 although
        string-length('𠀋') returned 2 wrongly before the bug is fixed.

        Attachments

          Issue Links

            Activity

              People

                aefimov Aleksej Efimov
                shadowbug Shadow Bug
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: