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

From Magnus Hagander
Subject Re: More Code Page wierdness
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE47657A@algol.sollentuna.se
Whole thread Raw
In response to More Code Page wierdness  (Simon Riggs <simon@2ndquadrant.com>)
List 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
changingthe font to Lucida console. But I only use very few characters that are affected by this (åäö only). 

//Magnus

pgsql-hackers-win32 by date:

Previous
From: Tom Lane
Date:
Subject: Re: More Code Page wierdness
Next
From: "Magnus Hagander"
Date:
Subject: Re: More Code Page wierdness