On 08/05/2011 02:58 PM, Martin Gill wrote:
> Hi all
>
> I have discovered what may be a bug in either SQLLite or System.Data.SQLite
> (v 1.0.66.0 using SQLite 3.6.23.1). I certainly don't understand what's
> happening and I'd apprecite it if someone could help me out; perhaps I'm
> missing something.
>
> To recreate the issue create a database with the following commands:
>
> CREATE VIRTUAL TABLE full_text USING FTS3 (id,text)
> INSERT INTO full_text VALUES ('1', 'I have a foréign character.')

SQLite does not recognize upper/lower-case mappings for non-ASCII
characters. That is why querying for "HAVE" works but "FORÉIGN"
does not. If you need upper/lower case mapping for non-ASCII characters,
you will need to use the ICU extension.

> SELECT id, text FROM full_text WHERE NOT(text = @p1) AND text MATCH @p2
>
> p1 = "foréign"
> p2 = "FORÉIGN"
>
> Not using parametrized SQL also returns a correct result.

I don't see how either the query above or a version that uses SQL
literals could be returning any rows.. Not with the "CREATE VIRTUAL
TABLE" as it stands above. Unless you specify the ICU tokenizer (or
some other tokenizer that understands non-ASCII upper/lower case),
"FORÉIGN" should not match the row in table "full_text".



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

Reply via email to