On 2 December 2011 13:18, Torsten Zuehlsdorff <f...@meisterderspiele.de> wrote:
> Hello,
>
> after several attempts I have finally succeeded in developing a urlencode()
> function to encode text correctly like defined in RFC 1738.
>
> Now i have a big problem: how to decode the text?
>
> Example:
> # SELECT urlencode('Hellö World!');
>       urlencode
> -----------------------
>  Hell%C3%B6%20World%21
>
> Does anybody know a way to convert '%21' back to '!' and '%C3%B6' to 'ö'?
>

I've extracted the unquote method [0] from urllib in the python stdlib
that decodes urlencoded strings. Hopefully be some use!

[0] http://pastie.org/2954968

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to