X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 398E4476392 for ; Mon, 5 May 2003 10:18:29 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id A7D8A47636F for ; Mon, 5 May 2003 10:18:27 -0400 (EDT) Received: from matrix.gatewaynet.com (localhost [127.0.0.1]) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h45JMC1s017780; Mon, 5 May 2003 17:22:12 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h45JMCcZ017776; Mon, 5 May 2003 17:22:12 -0200 Date: Mon, 5 May 2003 17:22:12 -0200 (GMT+2) From: Achilleus Mantzios To: Marco Roda Cc: pgsql-sql@postgresql.org Subject: Re: UNICODE and SQL In-Reply-To: <001401c3130b$0996ed80$0301a8c0@amdosoft.local> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, hits=-31.7 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/54 X-Sequence-Number: 13219 On Mon, 5 May 2003, Marco Roda wrote: > Hallo, >=20 > I need to use SQL to insert some language specific characters into tables. > In particular I am using German and Croatian specific characters. The > database is created with UNICODE encoding. > For instance, when trying to run from psql: >=20 > INSERT INTO test VALUES (1,'Urlaubslite f=FCr n=E4chstes Jahr'); >=20 > I get the following error: >=20 > ERROR: Invalid UNICODE character sequence found (0xfc7220) >=20 > because of '=FC' and '=E4'. >=20 > How to do it? If you want UTF-8 with psql then you must enable UTF-8 capable keyboard in X11. Now, normally in modern UNIX systems (with not so modern UTF-8 support), you often can deal with this problem by using (or writing) an application (e.g. in Java) that has Unicode support. As you are, you must=20 know or calculate the UTF-8 representation of each german or hrvcki ISO char, take both bytes of the resulting UTF-8 char and put them in the insert statement. Not very Handy :( Also check out for some tool like PgPhpAdmin and then set your mozilla page encoding to UTF-8. P.S. Anyone knows if pgaccess supports Unicode at all??? > Thanks, > Marco Roda >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faqs/FAQ.html >=20 --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr