Re: URL Decoding - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: URL Decoding
Date
Msg-id 45645FC5.1090400@wildenhain.de
Whole thread Raw
In response to URL Decoding  (Arnaud Lesauvage <thewild@freesurf.fr>)
Responses Re: URL Decoding  (Arnaud Lesauvage <thewild@freesurf.fr>)
List 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.

pgsql-general by date:

Previous
From: Tony Caduto
Date:
Subject: Re: MSSQL to PostgreSQL : Encoding problem
Next
From: Arnaud Lesauvage
Date:
Subject: Re: MSSQL to PostgreSQL : Encoding problem