Re: More Code Page wierdness - Mailing list pgsql-hackers-win32

From Magnus Hagander
Subject Re: More Code Page wierdness
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE47656A@algol.sollentuna.se
Whole thread Raw
In response to More Code Page wierdness  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: More Code Page wierdness  (Simon Riggs <simon@2ndquadrant.com>)
Re: More Code Page wierdness  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers-win32
> > > 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 editor?
>
> Looks like Windows Server 2003 was setup with "English -
> United States", then PostgreSQL was installed using "English
> -UK", and the system was being edited with a UK keyboard
> (which shows things like British pound, hash and star all in
> their correct (!) place ...i.e. different to US).

My question remains - was the '*' put there by the installer, or
manually using notepad (or whatever) later? (The checkbox in the
installer to modify it)

I wonder if a partial solution to this would be to set the codepage
before we load the config file? IIRC, the config file is loaded in
whatever codepage happens to be active when the server starts. The code
page is later changed when loading pg_control (LC_CTYPE should affect
it). That's how I think it works without specifically looking at the
code.

Then we could document which codepage should always be used to edit it.
It's not a beautiful solutino, but it would at least make the behaviour
predictable.

Not sure what would be involved in requiring the file to be UTF8.
Notepad can certainly handle UTF8, but I wonder how much would need to
bec hanged in pg...

//Magnus

pgsql-hackers-win32 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: More Code Page wierdness
Next
From: Simon Riggs
Date:
Subject: Re: More Code Page wierdness