On Fri, Aug 06, 2010 at 02:11:33PM -0400, Richard Hipp wrote:
> If "ch" is an unsigned char then how is the following unsafe:
> 
>      ch = (ch<0x80) ? tolower(ch) : ch
> 
> And why does it need to be changed to
> 
>     ch = (ch>='A' && ch<='Z') ? ch - 'A' + 'a' : ch;
> 
> There is only one such instance of code remaining in FTS3 (at
> fts3_tokenizer1.c:196) but I want to understand what the issue is before I
> change it.

The problem is that libc's tolower() is locale-aware.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to