Re: How to convert HEX to ASCII?

From: Damien Churchill <damoxc(at)gmail(dot)com>
To: Torsten Zuehlsdorff <foo(at)meisterderspiele(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert HEX to ASCII?
Date: 2011-12-02 13:58:46
Message-ID: CAFtEh-cRpiUnnAjD2Mg1nJwnzWomnNNcHWx7GeRJPWGCEMhT7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2 December 2011 13:18, Torsten Zuehlsdorff <foo(at)meisterderspiele(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gavin Mitchell 2011-12-02 14:02:33 sql statements using access frontend
Previous Message fschwend 2011-12-02 13:50:33 Re: odbc_fdw