Re: [PATCHES] WIN32_CONSOLE usage
| От | Manfred Spraul |
|---|---|
| Тема | Re: [PATCHES] WIN32_CONSOLE usage |
| Дата | |
| Msg-id | 3F60D542.2030409@colorfullife.com обсуждение исходный текст |
| Ответ на | Re: [PATCHES] WIN32_CONSOLE usage (Christoph Dalitz <christoph.dalitz@hs-niederrhein.de>) |
| Список | 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 по дате отправления: