Re: [PATCHES] WIN32_CONSOLE usage - Mailing list pgsql-cygwin

From Manfred Spraul
Subject Re: [PATCHES] WIN32_CONSOLE usage
Date
Msg-id 3F60D542.2030409@colorfullife.com
Whole thread Raw
In response to Re: [PATCHES] WIN32_CONSOLE usage  (Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>)
List pgsql-cygwin
Christoph Dalitz wrote:

>On Thu, 11 Sep 2003 20:51:24 +0200
>Manfred Spraul <manfred@colorfullife.com> wrote:
>
>
>>- 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.
>>
>>
>>
>I do not think that it is possible to handle all cases automatically.
>Even restricting the conversion to input/output on stdin/stdout will fail in
>some circumstances; eg. with the command "psql < script.sql" when the
>script has been written with a windows editor (notepad, emacs or whatever).
>
It would be very hard to get right. Perhaps something like isatty(),
except that it's probably called GetHandleIsConsoleFlag() or something
like that, followed by a check of the code page. But I didn't find a
suitable function yet.

--
    Manfred



pgsql-cygwin by date:

Previous
From: Christoph Dalitz
Date:
Subject: Re: [PATCHES] WIN32_CONSOLE usage
Next
From: Manfred Spraul
Date:
Subject: Re: [PATCHES] WIN32_CONSOLE usage