Re: More Code Page wierdness

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: More Code Page wierdness
Date: 2005-01-11 15:54:15
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE47657A@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

> > Not an error, but a warning. It's in
> src/bin/psql/startup.c, line 663
> > and forward. Called on line 304, right before going into
> the MainLoop().
>
> Ah-hah. I was grepping for "code page" not "codepage".
> (BTW, this warning appears not to be internationalized ---
> boo hiss --- and we will need to adjust it to point to
> whereever we decide to put the documentation about this issue.)
>
> So: what the heck does it mean when GetACP() != GetConsoleCP() ?
> I suppose those control different areas of functionality, but
> what exactly?

Dunno who's responsible for that code initially ;-)

Anyway.
GetACP() returns the "current ANSI codepage for the system".
GetConsoleCP() "retrieves the input code page used by the console"

The console by default uses what's caled the OEM charset. I assume GetACP() returns the default charset for *non-console* programs.

And no, I don't know exactly why that matters in the case of psql. I've always been able to "fix" thing by just changing the font to Lucida console. But I only use very few characters that are affected by this (åäö only).

//Magnus

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Magnus Hagander 2005-01-11 16:01:25 Re: More Code Page wierdness
Previous Message Tom Lane 2005-01-11 15:08:00 Re: More Code Page wierdness