Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 2FB2019B3F28 for ; Mon, 28 Nov 2011 08:27:38 -0400 (AST) Received: from mx01.clickware.de ([78.35.13.85]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1RV0J3-0001cG-00 for pgsql-bugs@postgresql.org; Mon, 28 Nov 2011 12:27:38 +0000 Received: (qmail 19676 invoked from network); 28 Nov 2011 12:27:16 -0000 Received: from unknown (HELO tglaptp) (thomas@192.168.1.236) by mx01.clickware.de with SMTP; 28 Nov 2011 12:27:16 -0000 From: "Thomas Goerner" To: Subject: Re: BUG #6308: Problem w. encoding in client Date: Mon, 28 Nov 2011 13:26:26 +0100 Message-ID: <788D6901C0544F20B394F44AE5B2E12B@tglaptp> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D4_01CCADD1.54A2D770" X-Mailer: Microsoft Office Outlook 11 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Thread-Index: AcytyPK98bmNVja3S4yQI22jNVgCBQ== X-Pg-Spam-Score: -3.1 (---) X-Archive-Number: 201111/191 X-Sequence-Number: 31786 This is a multi-part message in MIME format. ------=_NextPart_000_00D4_01CCADD1.54A2D770 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Craig, =20 thanks for your answer. =20 =20 > Restore using PgAdmin III or using a unicode console.=20 > This is a limitation of using a Win1252 client encoding when restoring = > data that isn't restricted to Win1252 and cannot be fixed directly. =20 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 =3D 'UTF8';). Is this overridden by PGCLIENTENCODING? = And if so, should it be? =20 And as we only encounter both problems in Windows7-64, it seems to me = they are closely related. =20 Regards Thomas =20 =20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D click:ware Informationstechnik GmbH Thomas Goerner Gesch=E4ftsf=FChrer fon: 0221 - 13 99 88-0 fax: 0221 - 13 99 88-79 Kamekestra=DFe 19 50672 K=F6ln tg@clickware.de www.clickware.de =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Kennen Sie schon unser GasDataWarehouse - Die kosteng=FCnstige L=F6sung = f=FCr den Austausch von Gasmessdaten? www.gasdatawarehouse.de =20 -----Urspr=FCngliche Nachricht----- Von: Craig Ringer [mailto:ringerc@ringerc.id.au] Gesendet: Sonntag, 27. November 2011 10:00 An: Thomas Goerner Cc: pgsql-bugs@postgresql.org Betreff: Re: [BUGS] BUG #6308: Problem w. encoding in client =20 On 11/25/2011 08:21 PM, Thomas Goerner wrote: >=20 > The following bug has been logged online: >=20 > Bug reference: 6308 > Logged by: Thomas Goerner > Email address: tg@clickware.de > PostgreSQL version: 9.1.1 > Operating system: Windows 7 64-bit > Description: Problem w. encoding in client > Details: >=20 > Hi, we have a problem regarding encoding with postgres 9.1.1 and Win7 = > 64-bit >=20 > Database encoding: UTF-8 > active codepage in Windows console: 1252 > PGCLIENTENCODING: Win1252 > Console font: Lucida console >=20 > In the above configuration, the following problems occur: >=20 > 1) > Text output from the client applications, e.g. the welcome-prompt of=20 > psql or the help page from pg_dump --help is not displayed correctly=20 > (especially german Umlauts and characters like "=AB" ). =20 That shouldn't be happening. As a workaround, try using a unicode = console (see the "chcp" command) and a unicode client encoding. =20 The issue with mismatched chars sounds like a real bug that wants = looking into. =20 > When we restore a dump in custom format and then try to re-dump the=20 > database, we get error messages like Zeichen 0xe28093 in Kodierung=20 > =BBUTF8=AB hat keine Entsprechung in =BBWin1252=AB (character 0xe28093 = in=20 > UTF-8 cannot be translated to Win1252) =20 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. =20 If you don't mind possibly corrupted error and NOTICE messages you can = just set a unicode client_encoding for your restore. =20 -- Craig Ringer =20 =20 ------=_NextPart_000_00D4_01CCADD1.54A2D770 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

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 = =3D '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

=A0

 

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

click:ware Informationstechnik GmbH

Thomas = Goerner

Gesch=E4ftsf=FChrer

fon: 0221 - 13 99 = 88-0

fax: 0221 - 13 99 = 88-79

Kamekestra=DFe = 19

50672 = K=F6ln

tg@clickware.de

www.clickware.de

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Kennen Sie schon = unser GasDataWarehouse - Die kosteng=FCnstige L=F6sung f=FCr den Austausch von Gasmessdaten?

www.gasdatawarehouse.de

 

-----Urspr=FCngliche Nachricht-----

Von: Craig Ringer = [mailto:ringerc@ringerc.id.au]

Gesendet: Sonntag, = 27. November 2011 10:00

An: = Thomas Goerner

Cc: pgsql-bugs@postgresql.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:=A0=A0=A0=A0=A0 6308

> = Logged by:=A0=A0=A0=A0=A0=A0=A0=A0=A0 Thomas = Goerner

> = Email address:=A0=A0=A0=A0=A0 tg@clickware.de

=

> = PostgreSQL version: 9.1.1

> = Operating system:=A0=A0 Windows 7 64-bit

> Description:=A0=A0=A0=A0=A0=A0=A0 Problem w. encoding in = client

> = Details:

> 

> = Hi, we have a problem regarding encoding with postgres=A0 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 "=AB" = ).

 

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 =

> =BBUTF8=AB hat = keine Entsprechung in =BBWin1252=AB (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

 

 

------=_NextPart_000_00D4_01CCADD1.54A2D770--