Re: How can I insert a UTF-8 character with psql? - Mailing list pgsql-general

From Ian Barwick
Subject Re: How can I insert a UTF-8 character with psql?
Date
Msg-id 200306130903.51177.barwick@gmx.net
Whole thread Raw
In response to How can I insert a UTF-8 character with psql?  (Roland Glenn McIntosh <roland@steeltorch.com>)
Responses Re: How can I insert a UTF-8 character with psql?  (Roland Glenn McIntosh <roland@steeltorch.com>)
Re: How can I insert a UTF-8 character with psql?  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
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@gmx.net


pgsql-general by date:

Previous
From: Lamar Owen
Date:
Subject: Re: [HACKERS] SAP and MySQL ... [and Benchmark]
Next
From: Justin Clift
Date:
Subject: Re: [HACKERS] SAP and MySQL ... [and Benchmark]