Re: BUG #6308: Problem w. encoding in client

From: "Thomas Goerner" <tg(at)clickware(dot)de>
To: "'Craig Ringer'" <ringerc(at)ringerc(dot)id(dot)au>
Cc: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6308: Problem w. encoding in client
Date: 2011-12-02 10:56:36
Message-ID: 021C7C8A088F4CFBA95CCF9A157E1986@tglaptp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello Craig,

it seems as if there were illegal chars in the originally dumped database,
so the dump/restore problem might be due to this. At the moment we are doing
further investigation on this issue.

But the problem regarding message output from the client applications still
persists. We are now setting up another set of 32/64-bit (virtual) Windows 7
machines to verify that the problem occurs only on 64 bit windows.

I will keep you informed.

Regards

Thomas

===================================
click:ware Informationstechnik GmbH
Thomas Goerner
Geschäftsführer
fon: 0221 - 13 99 88-0
fax: 0221 - 13 99 88-79
Kamekestraße 19
50672 Köln
<mailto:tg(at)clickware(dot)de> tg(at)clickware(dot)de
<http://www.clickware.de/> www.clickware.de
===================================
Kennen Sie schon unser GasDataWarehouse -
Die kostengünstige Lösung für den Austausch
von Gasmessdaten?
<http://www.gasdatawarehouse.de/> www.gasdatawarehouse.de

_____

Von: Craig Ringer [mailto:ringerc(at)ringerc(dot)id(dot)au]
Gesendet: Dienstag, 29. November 2011 03:33
An: Thomas Goerner
Cc: pgsql-bugs(at)postgresql(dot)org
Betreff: Re: [BUGS] BUG #6308: Problem w. encoding in client

On 11/28/2011 08:26 PM, Thomas Goerner wrote:

Hello Craig,

thanks for your answer.

> Restore using PgAdmin III or using a unicode console.

> This is a limitation of using a Win1252 client encoding when restoring

> data that isn't restricted to Win1252 and cannot be fixed directly.

That's new to me. AFAIK pg_restore looks into the dump file and sets the
client encoding accordingly (In fact the dump contains the statement SET
client_encoding = 'UTF8';). Is this overridden by PGCLIENTENCODING? And if
so, should it be?

Nope, pg_restore should be using UTF8 as the client encoding in that case.
If there are any errors or notices it won't be able to emit them correctly
on the terminal though, as win1252 can't represent everything in UTF8 (and
IIRC pg_restore doesn't recode from client_encoding to terminal encoding
anyway).

If the restore its self is failing then I agree that something's not working
properly, because you should be able to use a client_encoding different to
your terminal encoding. I wonder if recent changes intended to get psql to
pick up the terminal encoding automatically have had the unintended
side-effect of overriding pg_restore's attempt to set the client_encoding?

I'm rather surprised you only see this on x64. You're using the same Windows
and Pg version for both x64 and x64 but only the x64 test fails?

--
Craig Ringer

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message laurenz.albe 2011-12-02 11:06:41 BUG #6318: pg_dump for non-template languages is broken
Previous Message hmf 2011-12-02 09:48:01 BUG #6317: sequence error for pg_dump