Skip to content
Commit 697b611a authored by Philip Withnall's avatar Philip Withnall 🚫
Browse files

core: Fix indexing for unichars in PotentialMatch’s Jaro distance function

The indexing was getting out of sync between the two strings if one contained
a different number of non-ASCII characters to the other (as the indexing was
done in terms of bytes, rather than characters). This re-works the Jaro
distance function to operate on unichar arrays, and index in terms of
characters. This also means that exact matches now work over stripped non-ASCII
characters, which they didn’t before.

This adds a new test case. Yay.

Closes: https://bugzilla.gnome.org/show_bug.cgi?id=678474
parent 6dee26ca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment