[V4RB] RegEx search and UTF-8

Peter De Berdt peter.de.berdt at pandora.be
Fri Jul 23 11:32:27 CDT 2004


On 23 Jul 2004, at 10:01, Eric Ferrer wrote:

>> Especially look for
>> DefineEncodings in your SQLSelect, e.g. "SELECT * FROM Table WHERE
>> MyField='"+defineEncoding(mysearchstring,encodings.UTF8)+"'". It's
>> something you easily miss.
> Yes, I've done this.
> By the way:
> SELECT * FROM table WHERE Name LIKE 'boréales' NO_CASE
>  finds the records 'Boréales'
>
> The trouble is not there.
> I do need my app to be very permissive considering eéêëôö, etc.
> This still works with Unicode :
> SELECT * FROM table WHERE Name LIKE 'bor[eéèêë]' no_case
> But this not :
> SELECT * FROM table WHERE Name LIKE 'bor[eéèêë]ales' no_case
>
Try this:
SELECT * FROM table WHERE Name LIKE 'bor[eéèêë]+ales' no_case

or

SELECT * FROM table WHERE Name LIKE 'bor[eéèêë]{1,2}ales' no_case

Because Valentina 1 doesn't use UTF internally, it sees it as 2 
characters in case of é, è, ..., the "e" will be represented by one 
character, so you need to make your query "one or more" or "one or 
two". Let me know if it works, I'm curious :-)


Best regards

Peter De Berdt


More information about the Valentina mailing list