Re: More Code Page wierdness
От | Simon Riggs |
---|---|
Тема | Re: More Code Page wierdness |
Дата | |
Msg-id | 1105443280.3803.208.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: More Code Page wierdness ("Magnus Hagander" <mha@sollentuna.net>) |
Список | pgsql-hackers-win32 |
On Tue, 2005-01-11 at 11:20 +0100, Magnus Hagander wrote: > > > > 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 think it was originally put there by installer, then as part of faffing backwards and forwards trying to get connectivity to work, it was set to localhost, then to a looks-like-a-* by hand editing in the wrong code page. > 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. Yes, thats along the right lines. The issue also effects hash - since the looks-like-a-hash character in different code pages is not actually a hash either - so if you comment out a line, it could still be in effect, but you can't tell by looking! This also effects all other .conf files, including recovery.conf. So if you tried to recover a system using a recovery.conf coded on another system it could give you problems... Problem is this: Editors don't tell you what code page you're using, so when you edit a file you see one thing, then the server sees another. We could test the ASCII code and if we see a - a single character non-* in listen_addresses then issue a WARNING - if we see a line beginning with a non-alpha character assume it is a comment but we need a catch-all solution... -- Best Regards, Simon Riggs
В списке pgsql-hackers-win32 по дате отправления: