Index: src/func.c ================================================================== --- src/func.c +++ src/func.c @@ -704,15 +704,28 @@ cx = sqlite3Toupper(c); c = sqlite3Tolower(c); }else{ cx = c; } + while(1){ + const u8 *zStr1 = (const u8*)strchr((const char*)zString,c); + if( cx!=c ){ + const u8 *zStr2 = (const u8*)strchr((const char*)zString,cx); + if( zStr1==0 || (zStr2!=0 && zStr2