How to convert HEX to ASCII?

From: Torsten Zuehlsdorff <foo(at)meisterderspiele(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: How to convert HEX to ASCII?
Date: 2011-12-02 13:18:21
Message-ID: jbaj6t$hs7$1@dont-email.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 'ö'?

Thanks for your help and greetings from Germany,
Torsten
--
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse
auswerten kann.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message fschwend 2011-12-02 13:50:33 Re: odbc_fdw
Previous Message Oleg Serov 2011-12-02 08:16:52 Re: Postgresql + corrupted disk = data loss. (Need help for database recover)