How can I insert a UTF-8 character with psql?

From: Roland Glenn McIntosh <roland(at)steeltorch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How can I insert a UTF-8 character with psql?
Date: 2003-06-12 22:13:29
Message-ID: 5.1.0.14.2.20030612180632.05e9dfd0@lnxmain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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');

Note that I don't actually care how postgres stores this. I'm reading it via JDBC like this:
String curr = new String(rs.getBytes(1), "UTF-8");

Which I think is totally compatible with normal 7 bit characters.
Your help is appreciated.

-rgm

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2003-06-12 22:17:19 Re: Index not being used in MAX function (7.2.3)
Previous Message Jim C. Nasby 2003-06-12 22:00:50 Re: Index not being used in MAX function (7.2.3)