From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Hans Schou <hans(dot)schou(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Percent-encoding conversion to binary, %C2%A9 = © |
Date: | 2008-03-15 13:56:22 |
Message-ID: | 20080315135622.GC16516@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Mar 13, 2008 at 03:49:37PM +0100, Hans Schou wrote:
> Hi
>
> I have a little trouble with the chr() function.
>
> I have a string like this:
> "Copyright+%C2%A9+1856+Na%C3%AFve+retros%C2%AE"
> which should be converted to binary string like:
> "Copyright © 1856 Naïve retros®"
>
> Is there an easy way to do this conversion?
Looks like you have UTF-8 encoded with percent signs. Perhaps the right
approach is you covert the incoming text into a bytea array and then
use convert() to turn it in to a string.
Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Mayer | 2008-03-15 13:58:01 | Re: postgre vs MySQL |
Previous Message | Alban Hertroys | 2008-03-15 11:00:55 | Permission template |