Thread: REGULAR EXPRESSION POSSIBLE PROBLEM

REGULAR EXPRESSION POSSIBLE PROBLEM

From
"dev"
Date:
Hi PG team ,
my database is in UNICODE
I try this (with Bulgarian chars):

SELECT 'Тест проба' ~* 'тест' as result

returns FALSE

above query is same as:

SELECT 'Test exam' ~* 'test' as result

retuns TRUE

the only different is that strings are in English


Is there problem with cyrilic?
I tested postgresql server 8.0.0beta-4 in Win32 platform, but I have same
problem in linux/postgresql 7.4.x with UNICODE database.

Thanks in advanced.

regards Antony Raijekov

Re: REGULAR EXPRESSION POSSIBLE PROBLEM

From
Tom Lane
Date:
"dev" <dev@strategma.bg> writes:
> my database is in UNICODE
> I try this (with Bulgarian chars):

> SELECT 'Тест проба' ~* 'тест' as result

> returns FALSE

> above query is same as:

> SELECT 'Test exam' ~* 'test' as result

> retuns TRUE

The regexp stuff is not currently capable of dealing with case
conversions in multi-byte character sets (such as Unicode).
Is there a Latin-N encoding you could use?

            regards, tom lane