Re: WIN32_CONSOLE usage

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NLS changes
Следующее
От: Christoph Dalitz
Дата:
Сообщение: Re: WIN32_CONSOLE usage