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