Re: WIN32_CONSOLE usage - Mailing list pgsql-patches

From Manfred Spraul
Subject Re: WIN32_CONSOLE usage
Date
Msg-id 3F60C42C.3050703@colorfullife.com
Whole thread Raw
In response to Re: WIN32_CONSOLE usage  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: WIN32_CONSOLE usage
List pgsql-patches
Peter Eisentraut wrote:

>If you can detect that they are different, why can't you adjust the code
>page in that case only?
>
>
What should we do if we detect that they differ:
- set the console code page to the ansi code page. This has two
drawbacks: It doesn't work with Indic, because Indic doesn't have an
ansi code page. And the user must still switch the console font. But: if
the user must change the configuration, then he can as easily change
both the font and the code page. Which means: SetConsoleCP is the wrong
approach.
- OemToChar() and CharToOem() convert all console input/output. In the
long run this might be the better solution, if it works entirely without
user intervention. I'm not sure if it's possible to get all corner cases
right.

--
    Manfred




pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: WIN32_CONSOLE usage
Next
From: Manfred Spraul
Date:
Subject: Re: WIN32_CONSOLE usage