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

Re: BUG #6510: A simple prompt is displayed using wrong charset

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Alexander LAW <exclusion(at)gmail(dot)com>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset
Date: 2012-03-19 20:05:33
Message-ID: 1332187409-sup-4631@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-generalpgsql-hackers
Excerpts from Alexander LAW's message of dom mar 18 06:04:51 -0300 2012:
> I see two ways to resolve the issue.
> First is to use CharToOemBuff when writing a string to the "con" and 
> OemToCharBuff when reading an input from it.
> The other is to always use stderr/stdin for Win32 as it was done for 
> msys before. I think it's more straightforward.

Using console directly instead of stdin/out/err is more appropriate when
asking for passwords and reading them back, because you can redirect the
rest of the output to/from files or pipes, without the prompt
interfering with that.  This also explains why stderr is used instead of
stdout.

-- 
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: Peter GeogheganDate: 2012-03-19 20:48:07
Subject: Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)
Previous:From: Alvaro HerreraDate: 2012-03-19 20:01:37
Subject: Re: patch: autocomplete for functions

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2012-03-19 20:40:37
Subject: Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
Previous:From: kebe.1969Date: 2012-03-19 17:47:29
Subject: BUG #6543: pgadmin III - Error defining filter.

pgsql-general by date

Next:From: david.sahagianDate: 2012-03-19 20:24:10
Subject: usage of pg_get_functiondef() -- SQL state 42809
Previous:From: Lonni J FriedmanDate: 2012-03-19 19:38:11
Subject: Re: pg_upgrade + streaming replication ?

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