X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 33BE255BBC for ; Wed, 2 Mar 2005 07:54:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62766-06 for ; Wed, 2 Mar 2005 07:54:54 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id E37CC55387 for ; Wed, 2 Mar 2005 07:54:53 +0000 (GMT) Received: from gnari ([157.157.175.249] [157.157.175.249]) by quasar.skima.is with ESMTP; Wed, 2 Mar 2005 07:54:53 Z Subject: Re: psql encoding problem From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: mailreg@numerixtechnology.de Cc: pgsql-sql@postgresql.org In-Reply-To: <4223838A.7030904@numerixtechnology.de> References: <4223838A.7030904@numerixtechnology.de> Content-Type: text/plain; charset=iso-8859-1 Date: Wed, 02 Mar 2005 07:57:18 +0000 Message-Id: <1109750238.16690.101.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/13 X-Sequence-Number: 20492 On Mon, 2005-02-28 at 20:48 +0000, T E Schmitz wrote: > INSERT INTO item (name,retail_price) VALUES ('Cheese Soufflé',7.95,); > > (I presume you see the accented character in *Soufflé*) > > psql comes back with "invalid byte sequence for encoding "UNICODE": 0xe9" > If I do this via DbVisualizer, the record is inserted fine. might be the client encoding. test=# CREATE DATABASE unitest with ENCODING='UNICODE'; CREATE DATABASE test=# \connect unitest You are now connected to database "unitest". unitest=# create table a (n text); CREATE TABLE unitest=# insert into a values ('Cheese Soufflé is cool'); ERROR: invalid byte sequence for encoding "UNICODE": 0xe92069 unitest=# set client_encoding='LATIN1'; SET unitest=# insert into a values ('Cheese Soufflé is cool'); INSERT 7533697 1 unitest=# select * from a; n ------------------------ Cheese Soufflé is cool (1 row) unitest=# gnari