FTS3 updated here:  http://www.sqlite.org/src/ci/b8b465ed2c

On Fri, Aug 6, 2010 at 2:24 PM, Scott Hess <sh...@google.com> wrote:

> This bug comment describes the problem:
>   http://code.google.com/p/chromium/issues/detail?id=15261#c20
>
> excerpt:
> > 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).
>
> I think at the time the bug was being diagnosed, sqlite3_strnicmp()
> wasn't being exposed.  I think that does the right thing because it
> uses the internal UpperToLower table.
>
> -scott
>
>
> On Fri, Aug 6, 2010 at 11:11 AM, Richard Hipp <d...@sqlite.org> 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.
> >
> > On Fri, Aug 6, 2010 at 1:30 PM, Paweł Hajdan, Jr.
> > <phajdan...@chromium.org>wrote:
> >
> >> On Wed, Aug 4, 2010 at 15:23, Paweł Hajdan, Jr. <
> phajdan...@chromium.org
> >> >wrote:
> >>
> >> > I'm attaching a suggested patch to fix locale-unsafe usage of tolower
> in
> >> > FTS code. The goal is to make Chromium closer to the upstream, so if
> you
> >> > have a better solution, that's great.
> >>
> >>
> >> Oh, I have just noticed that the mailing list removes all attachments.
> What
> >> is the best way to send patches then?
> >>
> >> By the way, any suggestions about the Chromium patch I linked to (
> >>
> >>
> http://src.chromium.org/viewvc/chrome/trunk/src/third_party/sqlite/safe-tolower.patch?view=markup
> >> )?
> >> It seems that it has somehow been fixed in fts3 code. I'm not yet very
> >> familiar with the SQLite codebase though, so could you point me to the
> >> fixes?
> >> _______________________________________________
> >> sqlite-users mailing list
> >> sqlite-users@sqlite.org
> >> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >
> >
> >
> > --
> > ---------------------
> > D. Richard Hipp
> > d...@sqlite.org
> > _______________________________________________
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
---------------------
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to