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


From: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: manfred(at)colorfullife(dot)com, 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 09:17:49
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwinpgsql-hackers-win32pgsql-patches
On Wed, 10 Sep 2003 19:18:24 +0200 (CEST)
Peter Eisentraut <peter_e(at)gmx(dot)net> 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 console (with Manfred's solution, it actually only requires to set
> > the console font to "Lucida Console"). Alternatively no tweaks to psql could be done,
> > and the documentation should describe how the console can be forced to use the proper
> > encoding (this is certainly of interest to all win32 users of other applictaions as
> > well).
> 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 characters.
    Where should it be added? The Section "Installation on Windows" in the
    Administrator's Guide seems natural to me.

 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 windows codepage (1252)
	         8-bit characters will not work correctly. See PostgreSQL
	         documentation "Installation on Windows" for details.

Unfortunately there seems to be no automatic solution to the "console codepage problem",
because the windows codepage does not work with the default console font.
Thus the user must tweak his console settings in any case and I think a warning
is the best to remind the user of this issue.

Please let me know whether this "solution" would be ok. Then I can do it on Monday.


Could you please already remove the WIN32_CONSOLE and OemToChar/CharToOem stuff
from psql? Sorry for the inconvenience generated by my ignorance.

Christoph Dalitz

In response to


pgsql-cygwin by date

Next:From: doyle ervinDate: 2003-09-11 13:48:39
Subject: unsubscribe
Previous:From: raj_14_11Date: 2003-09-11 07:01:42
Subject: Re: postgresql on windows 2000

pgsql-patches by date

Next:From: Robert TreatDate: 2003-09-11 14:28:05
Subject: typo in datetime ref page
Previous:From: Weiping HeDate: 2003-09-11 08:15:56
Subject: Chinese NLS patch for 7.4

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2003-09-11 16:45:22
Subject: Re: [PATCHES] WIN32_CONSOLE usage
Previous:From: Christof PetigDate: 2003-09-11 07:40:45
Subject: Re: pgsql-server/src backend/bootstrap/Tag: backen ...

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