-
Xing Zhang authored
Cause: The nweights parameter of strnxfrm function means how many characters' weights are expected. But in the implementation of UCA 4.0.0 and 5.2.0, it is read as how many weights are to return. It works well when one character has only one primary weight, but some characters have more than one, that causes wrong comparison result. For example, U+00DF's weight in DUCET 4.0.0 is: [.0FEA.0020.0004.00DF][.0000.015D.0004.00DF][.0FEA.0020.001F.00DF], which has 2 non-ignorable primary weights: 0FEA, 0FEA. In the reported case, U+33FC's weight in DUCET 4.0.0 is: [.0E2B.0020.0004.33FC][.0E32.0020.0004.33FC][.FB40.0020.001F.65E5] [.E5E5.0000.0000.65E5], which has 4 non-ignorable primary weights. Solution: Fix by adding counter of characters whose weights are expected.
Xing Zhang authoredCause: The nweights parameter of strnxfrm function means how many characters' weights are expected. But in the implementation of UCA 4.0.0 and 5.2.0, it is read as how many weights are to return. It works well when one character has only one primary weight, but some characters have more than one, that causes wrong comparison result. For example, U+00DF's weight in DUCET 4.0.0 is: [.0FEA.0020.0004.00DF][.0000.015D.0004.00DF][.0FEA.0020.001F.00DF], which has 2 non-ignorable primary weights: 0FEA, 0FEA. In the reported case, U+33FC's weight in DUCET 4.0.0 is: [.0E2B.0020.0004.33FC][.0E32.0020.0004.33FC][.FB40.0020.001F.65E5] [.E5E5.0000.0000.65E5], which has 4 non-ignorable primary weights. Solution: Fix by adding counter of characters whose weights are expected.
Loading