RFR: 8032909: XSLT string-length returns incorrect length when string includes complementary chars
daniel.fuchs at oracle.com
Fri Feb 21 12:02:13 UTC 2014
On 2/20/14 7:44 PM, huizhe wang wrote:
> Hi Aleksej,
> The change looks good. It's good to consolidate test cases into a single
> test for each encoding.
> On 2/20/2014 6:54 AM, Aleksej Efimov wrote:
>> There is a problem in XSLT string-length function:
>> When string passed to this function contains complementary chars the
>> current implementation of XPath treates this sequence as two
>> characters (the string-length returns 2). But according to the w3 spec
>> it should be treated as a single XPath character .
>> Please, review the proposed fix for this problem . It replaces the
>> 'length' call in xslt compiler with a call to 'codePointCount'. Also
>> new regression test was added.
>> To verify the fix following tests were executed:
>> 1. JCK test sets: api/xsl api/xinclude api/javax_xml api/org_xml
>> 2. Regression tests from 'jdk_other' testset (includes added
>> regression test)
>> Thanks in advance,
>>  http://www.w3.org/TR/xpath/#strings
>>  http://cr.openjdk.java.net/~aefimov/8032909/webrev.00
More information about the core-libs-dev