[V4RB] RegEx search and UTF-8

Peter De Berdt peter.de.berdt at pandora.be
Thu Jul 22 18:49:37 CDT 2004


On 22 Jul 2004, at 17:44, Ruslan Zasukhin wrote:

> On 7/22/04 2:20 PM, "Eric Ferrer" <wonderfef at noos.fr> wrote:
>
>>> I think you should in RB convert from UTF8 to single byte enoding 
>>> before you
>>> store into Valentina.
>> You mean that I should store *all* values in the database without a 
>> specific
>> encoding, I mean like it was before RB 5.5 and its Unicode support?
>
> I think you need follow to Peter advice.
>
>>> Sadly enough, this doesn't work at all. You have to keep it UTF-8, 
>>> but
>>> make sure you use DefineEncoding(string,encodings.UTF8) for every 
>>> query
>>> sent and record retrieved from the database.
>> My query is UTF8 encoded...
>
>
Please double check that, I've had the same problem in one of my apps 
and although "I was 100% sure" I defined all my strings as UTF-8, I 
missed one (even though I assumed I didn't need to since my data was 
defined as UTF-8 when fetching the record. Especially look for 
DefineEncodings in your SQLSelect, e.g. "SELECT * FROM Table WHERE 
MyField='"+defineEncoding(mysearchstring,encodings.UTF8)+"'". It's 
something you easily miss.
>
>> Will Valentina v2 will help me with this problem ?
>
> Ys, Valentina itself work in Unicode, and it use new RegEx engine from 
> IBM



More information about the Valentina mailing list