Re: Table name with umlauts - Mailing list pgsql-general

From Tom Lane
Subject Re: Table name with umlauts
Date
Msg-id 15213.1290454603@sss.pgh.pa.us
Whole thread Raw
In response to Re: Table name with umlauts  (Raymond O'Donnell <rod@iol.ie>)
Responses Re: Table name with umlauts  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
Re: Table name with umlauts  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general
"Raymond O'Donnell" <rod@iol.ie> writes:
> On 22/11/2010 19:01, Thomas Kellerer wrote:
>> Tom Lane wrote on 22.11.2010 19:25:
>>> It looks to me like your console is not in fact producing UTF8;
>>> it's representing � as 0xf6, which I think is right for Latin1.
>>> Select the proper client_encoding.

>> I assume you mean the encoding in the console?

> No, he means the encoding on the connection:
>    http://www.postgresql.org/docs/9.0/static/multibyte.html#AEN30728
> ...so that the server returns the correct characters for your console.

For this problem it's actually more the other way round: the characters
being *sent* to the server have to be in the encoding you said they'd be
in, namely client_encoding.

I had the idea that the Windows version of psql was smart enough to
set client_encoding based on the console encoding it finds itself
running under, but I might be wrong about that.  Or maybe you did
something that overrode its default?

>> I changed to "chcp 1252" before running psql (I tried several other encodings as well)

Try "set client_encoding = win1252", then.

            regards, tom lane

pgsql-general by date:

Previous
From: Raymond O'Donnell
Date:
Subject: Re: Table name with umlauts
Next
From: anypossibility
Date:
Subject: Debug advice when postgres connection maxing out