Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3AB9B1337B4E for ; Thu, 23 Dec 2010 10:32:30 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 88268-08 for ; Thu, 23 Dec 2010 14:32:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outboundmta02.oricom.ca (outboundmta02.oricom.ca [64.18.160.77]) by mail.postgresql.org (Postfix) with ESMTP id 3BEAD1337B7E for ; Thu, 23 Dec 2010 10:32:21 -0400 (AST) X-ASG-Debug-ID: 1293114741-1b4190920001-ysJW5H Received: from Gateway (static-dslcom3-026.express.oricom.ca [64.18.178.26]) by outboundmta02.oricom.ca with ESMTP id roDn2b3eGELHJvzo for ; Thu, 23 Dec 2010 09:32:21 -0500 (EST) X-Barracuda-Envelope-From: mark.watson@jurisconcept.ca X-Barracuda-Apparent-Source-IP: 64.18.178.26 From: "Mark Watson" To: References: <6031A844240C4B4984706AA66337817E@Gateway> In-Reply-To: <6031A844240C4B4984706AA66337817E@Gateway> Subject: Re: Client_encoding Date: Thu, 23 Dec 2010 09:32:18 -0500 X-ASG-Orig-Subj: RE: [ADMIN] Client_encoding Message-ID: <27B1EE4F2F5748E39FF0721A49B288EF@Gateway> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18263 Thread-Index: Acuiq7Fe29w9TFLgT/SE/UEh67C3QwAAkTyg X-Barracuda-Connect: static-dslcom3-026.express.oricom.ca[64.18.178.26] X-Barracuda-Start-Time: 1293114741 X-Barracuda-URL: http://64.18.160.77:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at oricom.ca X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.50270 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201012/175 X-Sequence-Number: 36404 Hello again, Problem below solved if in fact PgAdmin only displays UTF8. ---------------------------------------------------------------- Hello group, Any suggestions as to how to fix this are greatly appreciated. My setup is Vista, locally installed Postgres 8.4.6 in default folders = with db initialised as (server_encoding) UTF8, and databases created with = default encoding of WIN1252. My application program is behaving correctly using libpq.dll. pgAdmin is configured with Preferences=3D>Font =3D Tahoma windows-1252 and Query=3D>Font =3D Tahoma 9 windows-1252. The test case: 1. Create a text file test.txt containing 1 line of 2 characters: = =E9=C9=A0 (acute accented lowercase and uppercase e, hex(E9C9), valid win1252 characters. 2. CREATE DATABASE dbtest =A0 WITH OWNER =3D postgres =A0=A0=A0=A0=A0=A0 ENCODING =3D 'WIN1252' =A0=A0=A0=A0=A0=A0 TABLESPACE =3D pg_default =A0=A0=A0=A0=A0=A0 LC_COLLATE =3D 'French_Canada.1252' =A0=A0=A0=A0=A0=A0 LC_CTYPE =3D 'French_Canada.1252' =A0=A0=A0=A0=A0=A0 CONNECTION LIMIT =3D -1; 3. Open query window to database dbtest and import the file test.txt... 4. CREATE TABLE test ( =A0 col_descr text ) WITH ( =A0 OIDS=3DFALSE ); ALTER TABLE test OWNER TO postgres; set client_encoding =3D 'WIN1252'; COPY test FROM 'C:\\pgtemp\\test.txt' with=A0 delimiter as '|' csv; select * from test; 5. Results (no errors reported): --- col_descr -- ---------------- --=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (1 row with nothing = displayed, but the length of col_descr =3D 2) 6. If I execute the query: set client_encoding =3D 'UTF8'; select * from test; The correct results are displayed. Is there a way, in PgAdmin, to to display the results when = client_encoding is set to WIN1252 ? - Mark -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin=20 ________________________________________ No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1170 / Virus Database: 426/3333 - Release Date: 12/23/10