Updates:
Cc: [email protected]
Comment #20 on issue 15261 by [email protected]: Crash in
history::TextDatabase::GetTextMatches
http://code.google.com/p/chromium/issues/detail?id=15261
I think I found a problem in fts2.c, which causes above problem I mentioned:
In fts2.c function parseSpec(), line 2752:
...
zTokenizer = "tokenize simple";
for(i=3; i<argc; ++i){
if( startsWith(azArg[i],"tokenize") ){
zTokenizer = azArg[i];
}else{
z = azArg[pSpec->nColumn] = firstToken(azArg[i], &zDummy);
pSpec->nColumn++;
}
}
...
The content of azArg[3] is "TOKENIZE", so startsWith(azArg[3], "tokenize")
shall
return true, but unfortunately, it returns false if locale is tr_TR.UTF-8.
See the source code of startsWith():
static int startsWith(const char *s, const char *t){
while( safe_isspace(*s) ){ s++; }
while( *t ){
if( safe_tolower(*s++)!=safe_tolower(*t++) ) return 0;
}
return *s!='_' && !safe_isalnum(*s);
}
and:
static int safe_isspace(char c){
return (c&0x80)==0 ? isspace(c) : 0;
}
static int safe_tolower(char c){
return (c&0x80)==0 ? tolower(c) : c;
}
static int safe_isalnum(char c){
return (c&0x80)==0 ? isalnum(c) : 0;
}
Apparently the problem is caused by tolower(), whose behavior is affected
by current
locale. Under locale tr_TR.UTF-8, tolower('I') returns 'I' rather than 'i',
because
lower case of 'I' defined in tr_TR is 'ı' (U+0131).
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---