Re: WIN32_CONSOLE usage - Mailing list pgsql-patches

From Christoph Dalitz
Subject Re: WIN32_CONSOLE usage
Date
Msg-id 20030911211326.52fb7bee.christoph.dalitz@hs-niederrhein.de
Whole thread Raw
In response to Re: WIN32_CONSOLE usage  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-patches
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).

That's why we introduced the WIN32_CONSOLE parameter, which was admittedly
not such a good idea and should be withdrawn.

Instructing the user how to set up the console so that 8-bit characters work
once and forever is the "rigth way" IMHO. The user will also profit from this
lesson when he uses some other console application, eg. the sqlite SQL-shell.

I will send in the "Win32 console setup instructions" next week.

Christoph


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: NLS changes
Next
From: Christoph Dalitz
Date:
Subject: Re: WIN32_CONSOLE usage