Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 12F13133798E for ; Thu, 23 Dec 2010 10:34:07 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 33247-05 for ; Thu, 23 Dec 2010 14:34:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sd-17937.dedibox.fr (sd-17937.dedibox.fr [88.191.100.74]) by mail.postgresql.org (Postfix) with ESMTP id 9B42113364DE for ; Thu, 23 Dec 2010 10:33:59 -0400 (AST) Received: from [192.168.42.162] (LCaen-151-93-7-26.w80-13.abo.wanadoo.fr [80.13.230.26]) by sd-17937.dedibox.fr (Postfix) with ESMTPA id EEA183B8F5; Thu, 23 Dec 2010 15:33:59 +0100 (CET) Message-ID: <4D135DD9.4010903@lelarge.info> Date: Thu, 23 Dec 2010 15:34:01 +0100 From: Guillaume Lelarge User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); fr; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Mark Watson CC: pgsql-admin@postgresql.org Subject: Re: Client_encoding References: <6031A844240C4B4984706AA66337817E@Gateway> In-Reply-To: <6031A844240C4B4984706AA66337817E@Gateway> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.324 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_NJABL_PROXY=2.224 X-Spam-Level: X-Archive-Number: 201012/176 X-Sequence-Number: 36405 Le 23/12/2010 15:14, Mark Watson a écrit : > 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=>Font = Tahoma > windows-1252 and Query=>Font = Tahoma 9 windows-1252. > > The test case: > 1. Create a text file test.txt containing 1 line of 2 characters: éÉ (acute > accented lowercase and uppercase e, hex(E9C9), valid win1252 characters. > 2. > CREATE DATABASE dbtest > WITH OWNER = postgres > ENCODING = 'WIN1252' > TABLESPACE = pg_default > LC_COLLATE = 'French_Canada.1252' > LC_CTYPE = 'French_Canada.1252' > CONNECTION LIMIT = -1; > 3. Open query window to database dbtest and import the file test.txt... > 4. > CREATE TABLE test > ( > col_descr text > ) > WITH ( > OIDS=FALSE > ); > ALTER TABLE test OWNER TO postgres; > set client_encoding = 'WIN1252'; > COPY test FROM 'C:\\pgtemp\\test.txt' with delimiter as '|' csv; > select * from test; > 5. Results (no errors reported): > --- col_descr > -- ---------------- > -- (1 row with nothing displayed, but the length of > col_descr = 2) > 6. If I execute the query: > set client_encoding = '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 ? > Nope. The Font option in the Preferences tab doesn't set the font of the grid. It'll do on next pgAdmin (major) release. -- Guillaume http://www.postgresql.fr http://dalibo.com