Searching oe character with REGEX

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Sep 17 12:21:41 CDT 2006


On 9/17/06 1:14 AM, "Pierre Rossel" <prossel2 at myrealbox.com> wrote:

Hi Pierre, 

> I'm still struggling with the oe character in Valentina.
> 
> Just to remember, what I call "oe character" is a single character composed
> of an "o" and  an "e" (see character 9C on
> http://en.wikipedia.org/wiki/Windows-1252 )
> 
> Everything is still fine when using Vdatabase.IOEncoding = "Windows-1252" on
> Windows. This character is stored as \\u0152 (in REGEX syntax) in Valentina
> database.
> 
> Now I tried my search function which is using LIKE for separated words (very
> fast) and REGEX for phrases.
> 
> It appears that using LIKE to search oe (2 chars) will find the special
> char. This is GOOD. Well done !
 
> However when searching with REGEX, it won't work. Is it a bug ?

Probably yes. REGEX we use - is from IBM ICU, i.e. It should be 100% aware
of any encoding...
 
May be we have lost somewhere some parameter to be passed to REGEX.

> I already have a workaround, but I would prefer not using it and the point
> fixed in Valentina, if possible.
> 
> The workaround is to replace "oe" in the search sting by "(oe|\\u0152)"
> (without the quotes).

I wonder, why not just "\\u0152" ?

-----
To make this fix faster we need your help:

1) report into Mantis

2) simple db

3) simple query that reproduce problem in VStudio
        wrong results is ..
        expected result should be ...

4) You work ONLY on Windows right?
    db was made on Windows?
    query works on Windows?
    so no any cross-platform issues here



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list