[iOS][globalization] Investigate matchLength
differences between Apple mobile and other ICU platform returned by (Last)IndexOf, IsSuffix, IsPrefix APIs
#112418
Labels
Milestone
matchLength
definition:Due to the applied normalization
runtime/src/native/libs/System.Globalization.Native/pal_collation.m
Lines 185 to 186 in ec118c7
matchLength
returned by the (Last)IndexOf, IsSuffix, IsPrefix APIs might not be what users expect.The
precomposedStringWithCanonicalMapping
converts the string to its NFC form, potentially causing the returned length to be shorter than expected (if a combination of two code points got normalized into a single code point).Possible solutions:
IndexOf
and remove the normalization while ensuring correct behavior.source
string based on the found index and calculate thematchLength
.The text was updated successfully, but these errors were encountered: