Re: How to convert HEX to ASCII? - Mailing list pgsql-general

From Damien Churchill
Subject Re: How to convert HEX to ASCII?
Date
Msg-id CAFtEh-cRpiUnnAjD2Mg1nJwnzWomnNNcHWx7GeRJPWGCEMhT7g@mail.gmail.com
Whole thread Raw
In response to How to convert HEX to ASCII?  (Torsten Zuehlsdorff <foo@meisterderspiele.de>)
Responses Re: How to convert HEX to ASCII?
List pgsql-general
On 2 December 2011 13:18, Torsten Zuehlsdorff <foo@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

pgsql-general by date:

Previous
From: Torsten Zuehlsdorff
Date:
Subject: How to convert HEX to ASCII?
Next
From: "Gavin Mitchell"
Date:
Subject: sql statements using access frontend