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

From: "Thomas Goerner" <tg(at)clickware(dot)de>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6308: Problem w. encoding in client
Date: 2011-11-28 12:26:26
Message-ID: 788D6901C0544F20B394F44AE5B2E12B@tglaptp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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?

And as we only encounter both problems in Windows7-64, it seems to me they
are closely related.

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

tg(at)clickware(dot)de

www.clickware.de

===================================

Kennen Sie schon unser GasDataWarehouse - Die kostengünstige Lösung für den
Austausch von Gasmessdaten?

www.gasdatawarehouse.de

-----Ursprüngliche Nachricht-----

Von: Craig Ringer [mailto:ringerc(at)ringerc(dot)id(dot)au]

Gesendet: Sonntag, 27. November 2011 10:00

An: Thomas Goerner

Cc: pgsql-bugs(at)postgresql(dot)org

Betreff: Re: [BUGS] BUG #6308: Problem w. encoding in client

On 11/25/2011 08:21 PM, Thomas Goerner wrote:

>

> The following bug has been logged online:

>

> Bug reference: 6308

> Logged by: Thomas Goerner

> Email address: tg(at)clickware(dot)de

> PostgreSQL version: 9.1.1

> Operating system: Windows 7 64-bit

> Description: Problem w. encoding in client

> Details:

>

> Hi, we have a problem regarding encoding with postgres 9.1.1 and Win7

> 64-bit

>

> Database encoding: UTF-8

> active codepage in Windows console: 1252

> PGCLIENTENCODING: Win1252

> Console font: Lucida console

>

> In the above configuration, the following problems occur:

>

> 1)

> Text output from the client applications, e.g. the welcome-prompt of

> psql or the help page from pg_dump --help is not displayed correctly

> (especially german Umlauts and characters like "«" ).

That shouldn't be happening. As a workaround, try using a unicode console
(see the "chcp" command) and a unicode client encoding.

The issue with mismatched chars sounds like a real bug that wants looking
into.

> When we restore a dump in custom format and then try to re-dump the

> database, we get error messages like Zeichen 0xe28093 in Kodierung

> »UTF8« hat keine Entsprechung in »Win1252« (character 0xe28093 in

> UTF-8 cannot be translated to Win1252)

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.

If you don't mind possibly corrupted error and NOTICE messages you can just
set a unicode client_encoding for your restore.

--

Craig Ringer

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ronan Dunklau 2011-11-28 13:30:11 pg_dump - foreign table - server name is not quoted
Previous Message Simon Riggs 2011-11-28 07:02:37 Re: BUG #6307: intarray extention gin index does not work with Hot standby