X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5F16DD85F5 for ; Mon, 10 Oct 2005 11:27:27 -0300 (ADT) 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 42091-07 for ; Mon, 10 Oct 2005 14:27:22 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id DDE70D79CF for ; Mon, 10 Oct 2005 11:27:24 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9AERRuV020561; Mon, 10 Oct 2005 10:27:27 -0400 (EDT) To: Hannes Dorbath Cc: pgsql-admin@postgresql.org Subject: Re: character problem In-reply-to: References: <4349106C.6080206@infinito.it> <434A2792.1070106@infinito.it> Comments: In-reply-to Hannes Dorbath message dated "Mon, 10 Oct 2005 12:08:29 +0200" Date: Mon, 10 Oct 2005 10:27:27 -0400 Message-ID: <20560.1128954447@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/114 X-Sequence-Number: 19186 Hannes Dorbath writes: > On 10.10.2005 11:56, Luca Ferrari wrote: >> gestione_personale=# \l >> List of databases >> Name | Owner | Encoding >> --------------------+-----------+----------- >> gestione_database | dbmanager | SQL_ASCII >> gestione_personale | wwwrun | SQL_ASCII >> template0 | dbmanager | SQL_ASCII >> template1 | dbmanager | SQL_ASCII > OK, so you are not using Unicode. I don't know much about the SQL_ASCII > charset, but I expect it to slightly differ from LATIN1. Type > SET client_encoding = LATIN1; No, SQL_ASCII represents the complete absence of any encoding knowledge. With this database setting, changing client_encoding is a complete no-op. Postgres will just absorb and re-emit strings exactly as they were supplied originally, no matter what client_encoding is. The cause of the unexpected conversions Luca is having trouble with must be somewhere on the client side. It's not going to be done by Postgres with this encoding setting. If you are actively dealing with non-7-bit-ASCII data, using SQL_ASCII for the database encoding is probably a bad idea, exactly because Postgres won't help you out at all with converting encodings or enforcing that data is validly encoded. regards, tom lane