Re: [PATCHES] WIN32_CONSOLE usage

2003-09-14 Thread Christoph Dalitz
On Wed, 10 Sep 2003 19:18:24 +0200 (CEST) Peter Eisentraut <[EMAIL PROTECTED]> wrote: > > > The easiest would be to withdraw the WIN32_CONSOLE stuff from psql, replace it with > > Manfred's solution and add to the documentation a tutorial how to make 8-bit > > characters > > work in the Win32 con

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-14 Thread Christoph Dalitz
On Thu, 11 Sep 2003 20:30:53 +0200 (CEST) Peter Eisentraut <[EMAIL PROTECTED]> wrote: > > > b) Add code to psql that prints a warning on startup of psql when the > > console codepage differs from the windows codepage, something like > > > > Warning: Console codepage (850) differs from wind

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-14 Thread Christoph Dalitz
On Thu, 11 Sep 2003 20:51:24 +0200 Manfred Spraul <[EMAIL PROTECTED]> 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 c

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-12 Thread Bruce Momjian
Christoph Dalitz wrote: > @Bruce: > --- > > Could you please already remove the WIN32_CONSOLE and OemToChar/CharToOem stuff > from psql? Sorry for the inconvenience generated by my ignorance. Removed. Thanks. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PRO

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-11 Thread Manfred Spraul
Peter Eisentraut wrote: If you can detect that they are different, why can't you adjust the code page in that case only? What should we do if we detect that they differ: - set the console code page to the ansi code page. This has two drawbacks: It doesn't work with Indic, because Indic doesn't

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-11 Thread Bruce Momjian
Christoph Dalitz wrote: > > Please send in a patch. Else, someone else is going to try to fix it with > > less guarantees that it will work afterwards. > > > Ok. I can do the following: > > a) Write documentation how the win32 console needs to be set up so that > psql can handle 8-bit chara

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-11 Thread Manfred Spraul
Christoph Dalitz wrote: On Thu, 11 Sep 2003 20:51:24 +0200 Manfred Spraul <[EMAIL PROTECTED]> 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

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-11 Thread Peter Eisentraut
Christoph Dalitz writes: > a) Write documentation how the win32 console needs to be set up so that > psql can handle 8-bit characters. > Where should it be added? The Section "Installation on Windows" in the > Administrator's Guide seems natural to me. Sure. > b) Add code to psql t

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-10 Thread Peter Eisentraut
Christoph Dalitz writes: > The easiest would be to withdraw the WIN32_CONSOLE stuff from psql, replace it with > Manfred's solution and add to the documentation a tutorial how to make 8-bit > characters > work in the Win32 console (with Manfred's solution, it actually only requires to set > the c

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-09 Thread Christoph Dalitz
On Sun, 07 Sep 2003 20:37:08 +0200 Manfred Spraul <[EMAIL PROTECTED]> wrote: > > >>I think we ought to detect the console type automatically anyway. > >>Certainly we don't want people to have to set this variables all the time. > >> > Does input from the console work correctly right now? > >

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-07 Thread Manfred Spraul
Bruce Momjian wrote: I think we ought to detect the console type automatically anyway. Certainly we don't want people to have to set this variables all the time. Agreed. Automatic is ideal. Any ideas out there? Does input from the console work correctly right now? What about setting th

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-07 Thread Bruce Momjian
Peter Eisentraut wrote: > c) Problem: 8bit characters were displayed/interpreted wrong in psql >This is due to the fact that the Win32 "console" uses a >different encoding than the rest of the Windows system > Solution: Introduced a new psql variable WIN32_C

Re: [PATCHES] WIN32_CONSOLE usage

2003-09-07 Thread Peter Eisentraut
Bruce Momjian writes: > Is this a valid feature? Should I document it? Maybe it's a valid feature, but the implementation is not valid. Other applications also make use of the print routines (e.g., createlang), and they cannot interactively set variables. So I repeat: the print routines may not

[PATCHES] WIN32_CONSOLE usage

2003-09-07 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian writes: > > > The problem is that mbvalidate() has this code: > > > > if (GetVariableBool(pset.vars, "WIN32_CONSOLE")) > > CharToOem(pwcs, pwcs); > > > > That's why I needed the #ifdef so it only tests from psql. This code > > was just b