Have a look at translate(). It behaves like the unix command 'tr'.
Randall Lucas wrote:
>
> Hi Mallah,
>
> I had this problem once, and put together this bunch of regexes. It's
> by no means optimal, but should solve 90% and would easily be adapted
> into a plperl function.
>
> Begin perl:
>
Thanks Ian ,
Indeed its the simplest/easiest solution to this problem i feel.
i did tried to_ascii function but was not specifying 'LATIN1'
do i was getting error
tradein_clients=# SELECT to_ascii('BÂLÂ MORGHÂB' );
ERROR: pg_to_ascii(): unsupported encoding from SQL_ASCII
would u like to exp
On Tuesday 27 May 2003 22:55, [EMAIL PROTECTED] wrote:
> Is there any easy way for converting accented text to
> closest text without accents in postgresql ?
>
> eg:
>
> BÂLÂ MORGHÂB to BALA MORGHAB
Have you looked at to_ascii()? Something along the lines of
select to_ascii('Â', 'LATIN1')
Ia
Full disclosure on previously posted Perl code: I think I may have
cribbed all or part of that previous code from something (Perl
cookbook?). In any case, the issue is essentially a mapping of which
ascii codes "look like" low-ascii, so I don't think there are any
authorship issues.
Best,
Ra
Hi Mallah,
I had this problem once, and put together this bunch of regexes. It's
by no means optimal, but should solve 90% and would easily be adapted
into a plperl function.
Begin perl:
$value =~ s/[\xc0-\xc6]/A/g;
$value =~ s/[\xc7]/C/g;
$value =~ s/[\xc8-\xcb]/E/g;
$value =~ s/[\xcc
Is there any easy way for converting accented text to
closest text without accents in postgresql ?
eg:
BÂLÂ MORGHÂB to BALA MORGHAB
Regds
Mallah.
-
Get your free web based email at trade-india.com.
"India's Leading B2B eMarketplace.!"
http://w