Skip site navigation (1) Skip section navigation (2)

Re: More Code Page wierdness

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>,<pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: More Code Page wierdness
Date: 2005-01-11 09:18:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers-win32
> Spent a few hours today diagnosing some errors on Win32 (on 
> Windows Server 2003). These were, I think, wrongly identified 
> as being Windows Installer problems, so I believe Magnus was 
> chasing his tail also.

I assume you are talking about the "Access Denied" on initdb error that
David Saunders reported? If so, I erally don't think that specific
problem has to do with encoding - it happens *before* initdb even
starts. I think it's two different issues.

> The problem seemed to be code page related...
> If you set listen_addresses="*" then the pgsql server doesn't 
> recognise this because * in one code page is different from * 
> in another. It looks like a *, but it isn't...


> Setting listen_addresses to other valid values works just 
> fine....tested with "localhost" using local TCP/IP 
> connection; "localhost, 10.0.0.x"
> with access from 10.0.0.x...all working fine.
> Changing the default Language setting to match that of your 
> keyboard is only a temporary workaround, since you can't be 
> sure which code page is in use by any particular application 
> or window. The only way to be sure is to set the default code 
> page to the current locale and reboot, but I'm not sure that 
> catches everything either once things have been edited.

You can log in as the postgres user and change it there.

I've not seen this myself, and I've run on systems in US English and in
Swedish. But you're saying this occurs if say I have the system default
set to something that uses Latin1 and then use a different encoding when
I edit the file? I guess that can be a problem, since notepad doesn't
let you chose encoding. 
Or are you saying it occurs even if the encodings are the same?

One way to solve this would be to keep the file in UTF-8  or something,
I guess, but that's a fairly major code change... Or find some way to
make sure it's always saved in whatever encoding postgres expects

> These are definitely not Windows Installer problems because 
> it is perfectly valid action to change the Language of a 
> server, at least in Europe. The server should work, no matter 
> what any installer did/does....just the same as the server 
> knows not to start if the installer incorrectly set up the 
> rights of the instance owning userid.

Definitly. The issue appears to be that you have an invalid encoding in
the config file. How exaclty did you get there - did the installer edit
it into the wrong encoding, or did you edit it manually? Using what



pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2005-01-11 09:20:56
Subject: Re: More Code Page wierdness
Previous:From: Magnus HaganderDate: 2005-01-11 09:09:15
Subject: Re: More Code Page wierdness

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group