Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] WIN32_CONSOLE usage

From: Manfred Spraul <manfred(at)colorfullife(dot)com>
To: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
Cc: peter_e(at)gmx(dot)net, pgman(at)candle(dot)pha(dot)pa(dot)us,pgsql-patches(at)postgresql(dot)org, pgsql-hackers-win32(at)postgresql(dot)org,pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [PATCHES] WIN32_CONSOLE usage
Date: 2003-09-11 20:04:18
Message-ID: 3F60D542.2030409@colorfullife.com (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-hackers-win32pgsql-patches
Christoph Dalitz wrote:

>On Thu, 11 Sep 2003 20:51:24 +0200
>Manfred Spraul <manfred(at)colorfullife(dot)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



In response to

pgsql-cygwin by date

Next:From: Bipinchandra RanpuraDate: 2003-09-12 09:57:22
Subject: unsubscribe
Previous:From: Christoph DalitzDate: 2003-09-11 19:13:26
Subject: Re: [PATCHES] WIN32_CONSOLE usage

pgsql-patches by date

Next:From: Neil ConwayDate: 2003-09-11 21:26:50
Subject: more doc cleanup
Previous:From: Christoph DalitzDate: 2003-09-11 19:13:26
Subject: Re: [PATCHES] WIN32_CONSOLE usage

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2003-09-12 02:11:07
Subject: Re: [HACKERS] Win32 native port
Previous:From: Christoph DalitzDate: 2003-09-11 19:13:26
Subject: Re: [PATCHES] WIN32_CONSOLE usage

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group