pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bo Thorbjørn Jensen <bo@budget123.dk>
To: Craig Ringer <ringerc@ringerc.id.au>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6246: character encoding for 64 bit
Date: Wed, 12 Oct 2011 09:52:43 +0200
Message-ID: <B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk> (raw)
In-Reply-To: <4E94F894.9000108@ringerc.id.au>
References: <201110100820.p9A8KWOu064380@wwwmaster.postgresql.org>
	<4E94F894.9000108@ringerc.id.au>

> 12. oktober 2011 04:17


> Emne: Re: [BUGS] BUG #6246: character encoding for 64 bit
> 
> On 10/10/2011 04:20 PM, Bo wrote:
> > The following bug has been logged online:
> >
> > Bug reference:      6246
> > Logged by:          Bo
> > Email address:      bo@budget123.dk
> > PostgreSQL version: 9.1
> > Operating system:   Windows server 2008
> > Description:        character encoding for 64 bit
> > Details:
> >
> > I have just installed postgresql-9.1.1 on a windows server 2008 64
> > (from binary postgresql-9.1.1-1-windows-x64) One database is in latin1
> > encoding and when connecting to it with psql i get an error:
> 
> What's the output of the psql command:
> 
>     \l+
> 
> ?
> 
> What does "SHOW client_encoding;" report for the working and non-working
> tests?
> 
> Can you connect to the problem database "demo_" from PgAdmin III? Is it
> only psql on the Windows command line that's a problem?
> 
> What's your default codepage for your windows commandline, when you
> change nothing?
> 
> --
> Craig Ringer
> 
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make
> changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs

Hi
Heres some info (and hopefully some answers)

Firstly i removed 9.1.1 and installed 9.0.5. Now it seems to work.. mostly (lugging latin1 dbs around is still no picknick)..
But just logging into the postgres db now gives me this:

**
D:\PostgreSQL\9.0\bin>psql.exe -U postgres -d postgres
Password for user postgres:
psql (9.0.5)
WARNING: Console code page (850) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

postgres=#
**

Standard commanline codepage is 850, previous bit is with 850 as well.
"psql -l" returns a rather long list, heres part of it:

**
demo_	 | demos        | LATIN1   | C         |C     |
.....
postgres             | postgres      | UTF8     | C         |C     |
**

Client encodings:

**
D:\PostgreSQL\9.0\bin>psql.exe -U postgres -d postgres -c "show client_encoding"

Password for user postgres:
 client_encoding
-----------------
 UTF8
(1 row)

D:\PostgreSQL\9.0\bin>psql.exe -U postgres -d demo_ -c "show client_encoding"
Password for user postgres:
 client_encoding
-----------------
 LATIN1
(1 row)
**

And lastly, yes i could connect with pgadmin without problems.
Remember these examples comes from another version, but i hope its not entirely useless.

I would like to add that although solved, the command line psql is showing some quirks in the same enviroment (windows server 2008 R2 Standard). If i run scripts with psql -f it chokes on BOM discriptors in utf8 files. If i convert the files to windows 1252 it works fine..
like this (update is first word in first line, file contains no non-acsii characters):
**
psql:page_spelling.sql:1: ERROR:  syntax error at or near "update"
**

Again, i hope its usefull. 
Regards
Bo Thorbjørn Jensen



view thread (9+ messages)  latest in thread

Message-ID: <B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk>
Permalink:  ../B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk/
Also on:    postgresql.org/message-id/B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: bo@budget123.dk, ringerc@ringerc.id.au
  Subject: Re: BUG #6246: character encoding for 64 bit
  In-Reply-To: <B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk>
  References: <201110100820.p9A8KWOu064380@wwwmaster.postgresql.org> <4E94F894.9000108@ringerc.id.au> <B90F43DE7B038343B629A71E107CADB749D4CDFF25@EXMBXCLUS01.exchangeserver.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox