Re: URL Decoding

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Arnaud Lesauvage <thewild(at)freesurf(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: URL Decoding
Date: 2006-11-22 14:33:41
Message-ID: 45645FC5.1090400@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Arnaud Lesauvage schrieb:
> Hi List !
>
> I am looking for an easy URL decoding function.
> I thought about using regexp_replace, but I cna't get it to work :
>
> SELECT regexp_replace('foo%B5bar', '%(..)', '\x\\1' , 'g');
> > 'fooxB5bar'
>
> I wanted to replace %BE with the character \xB5 (µ, I think), but of
> course I am doing this wrong...
> Is there a simple way t odo this ?

I was simply using a stored function using pl/pythonu with
urllib (split and unquote). Works flawlessy :-)

Regards
T.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2006-11-22 14:34:19 Re: MSSQL to PostgreSQL : Encoding problem
Previous Message Tony Caduto 2006-11-22 14:32:20 Re: MSSQL to PostgreSQL : Encoding problem