From: | Dennis Gearon <gearond(at)cvc(dot)net> |
---|---|
To: | Ian Barwick <barwick(at)gmx(dot)net> |
Cc: | Roland Glenn McIntosh <roland(at)steeltorch(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: How can I insert a UTF-8 character with psql? |
Date: | 2003-06-13 15:30:40 |
Message-ID: | 3EE9EE20.8060709@cvc.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Any chance there's ever going to be HEX escaping?
Ian Barwick wrote:
> On Friday 13 June 2003 00:13, Roland Glenn McIntosh wrote:
>
>>I would like to insert a EuroSign as two byte character number 20AC.
>>Is there a way I can do this from an ISO-8859-1 (latin1) terminal emulator
>>via the psql tool? Is there an entity scheme?
>>
>>I tried various permutations of the following to no avail:
>> INSERT INTO mytable VALUES('currency_symbol','\u20AC');
>
>
> Use escaped octal codes:
> INSERT INTO my_tbl (unitxt) VALUES('\303\244')
> (replace '\303\244' with whatever 20AC is in octal), or if you prefer typing
> to maths:
>
> INSERT INTO my_tbl (unitxt) VALUES(encode(decode('c3a4','hex'), 'escape'))
>
> Ian Barwick
> barwick(at)gmx(dot)net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-06-13 15:37:46 | Re: Index not being used in MAX function (7.2.3) |
Previous Message | Bruno Wolff III | 2003-06-13 15:25:11 | Re: Index not being used in MAX function (7.2.3) |