Hackers,
The current version of levenshtein function in fuzzystrmatch contrib modulte
doesn't work properly with multibyte charater sets.
test=# select levenshtein('фыва','аыва');
levenshtein
-------------
2
(1 row)
My patch make this function works properly with multibyte charater sets.
test=# select levenshtein('фыва','аыва');
levenshtein
-------------
1
(1 row)
Also it avoids text_to_cstring call.
Regards,
Alexander Korotkov.