Disregard whitespaces in confusable name comparison

This commit is contained in:
def 2014-11-26 02:05:40 +01:00
parent c1fd694c14
commit 771eb1a625

View file

@ -2061,8 +2061,18 @@ int str_utf8_comp_names(const char *a, const char *b)
while(*a && *b) while(*a && *b)
{ {
codeA = str_utf8_decode(&a); do
codeB = str_utf8_decode(&b); {
codeA = str_utf8_decode(&a);
}
while(*a && !str_utf8_isspace(codeA));
do
{
codeB = str_utf8_decode(&b);
}
while(*b && !str_utf8_isspace(codeB));
diff = codeA - codeB; diff = codeA - codeB;
if((diff < 0 && !str_utf8_is_confusable(codeA, codeB)) if((diff < 0 && !str_utf8_is_confusable(codeA, codeB))