default client_encoding with psql on windows

From: "Thomas Sondag" <thomas(dot)sondag(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: default client_encoding with psql on windows
Date: 2006-05-08 16:14:01
Message-ID: 2354aa530605080914m4cc78935w3714c89b013c9dce@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi all,

I try to solve a litle problem, with PostgreSQL 8.1.3 on windows with UTF8.

I read all the documentation related to psql on windows, I turn my
cmd.exeencoding to codepage 1252 with the good font.

When I try a connection to my UTF8 database with psql (with my windows
cp1252 terminal) I have some problems like \d produce an error : "ERROR:
invalid UTF-8 byte sequence detected near byte 0xe9", because my
client_encoding is set to UTF8.

So I try to set my encoding to "win1252" with \encoding win1252 and it's
work beter. I would like to set it by default but for psql only (all other
programs speak UTF8).

I tried various things with the --set option of psql without success, like
--set client_encoding=win1252 or --set CLIENT_ENCODING=win1252 or --set
encoding=win1252.

I think my syntax is good but that doesn't work.

This part of the man page doesn't sound realy good to me (concerning the
--set option) :
"These assignments are done
during a very early stage of start-up, so variables reserved for
internal purposes might get overwritten later."

But you are my last change before reading the source code, so please tell
me if you have any clue :)

Thomas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2006-05-08 17:07:24 Re: database size grows (even after vacuum (full and analyze))....
Previous Message Tom Lane 2006-05-08 14:43:13 Re: catalog is missing 16 attribute(s) for relid 8202590