On Sun, 07 Sep 2003 20:37:08 +0200
Manfred Spraul <[EMAIL PROTECTED]> wrote:
> >>I think we ought to detect the console type automatically anyway.
> >>Certainly we don't want people to have to set this variables all the time.
> >>    
> Does input from the console work correctly right now?
> What about setting the code page of the console to the ansi code page? 
> Or to the code page that postgresql uses internally.
>     SetConsoleCP(GetACP());
>     SetConsoleOutputCP(GetACP());
> might be sufficient.
Shame on me!

Manfred's suggestion works perfectly. I did not realize this because the default
"rasterfont" for the win32 console cannot be used with codepage 1252 (windows
codepage on my system). When I switch to the font "Lucida Console" however, all
is fine with codepage 1252.

I have found this soultion here:

Actually no psql tweaks are necessary at all, because the codepage for a console window
can be set with "cmd.exe /c chcp 1252". When I put this in my .bashrc, I actuallay
can use umlauts.

Sorry for producing some inconviniences in the psql devellopment.

The easiest would be to withdraw the WIN32_CONSOLE stuff from psql, replace it with
Manfred's solution and add to the documentation a tutorial how to make 8-bit characters
work in the Win32 console (with Manfred's solution, it actually only requires to set
the console font to "Lucida Console"). Alternatively no tweaks to psql could be done,
and the documentation should describe how the console can be forced to use the proper
encoding (this is certainly of interest to all win32 users of other applictaions as

Christoph Dalitz

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to