Hopefully fix string fuzzying for unicode

This commit is contained in:
def 2015-07-11 19:26:57 +02:00
parent 76e4ca1bf6
commit 6d68e22cd1
3 changed files with 4 additions and 2 deletions

View file

@ -2188,7 +2188,7 @@ const char *str_utf8_skip_whitespaces(const char *str)
return str;
}
static int str_utf8_isstart(char c)
int str_utf8_isstart(char c)
{
if((c&0xC0) == 0x80) /* 10xxxxxx */
return 0;

View file

@ -1245,6 +1245,8 @@ int str_utf8_comp_names(const char *a, const char *b);
int str_utf8_isspace(int code);
int str_utf8_isstart(char c);
const char *str_utf8_skip_whitespaces(const char *str);
/*

View file

@ -1195,7 +1195,7 @@ void CSqlScore::FuzzyString(char *pString)
break;
newString[pos++] = pString[i];
if (pString[i] != '\\')
if (pString[i] != '\\' && str_utf8_isstart(pString[i]))
newString[pos++] = '%';
}