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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: exclusion <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-16 19:13:41
Message-ID: 1331925178-sup-9261@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general pgsql-hackers


Excerpts from exclusion's message of sáb mar 03 15:44:37 -0300 2012:

> I'm using postgresSQL in Windows with Russian locale and get unreadable
> messages when the postgres utilities prompting me for input.
> Please look at the screenshot:
> http://oi44.tinypic.com/aotje8.jpg
> (The psql writes the unreadable message prompting for the password.)
> But at the same time the following message (WARINING) displayed right.
>
> I believe it's related to setlocale and the difference between OEM and ANSI
> encoding, which we had in Windows with the Russian locale.
> The startup code of psql sets locale with the call setlocale(LC_ALL, "") and
> MSDN documentation says that the call:
> Sets the locale to the default, which is the user-default ANSI code page
> obtained from the operating system.
>
> After the call all the strings printed with the printf(stdout) will go
> through the ANSI->OEM conversion.
>
> But in the simple_prompt function strings written to con, and such writes go
> without conversion.

Were you able to come up with some way to make this work?

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark M. 2012-03-18 04:11:48 Re: BUG #6511: calling spi_exec_query from non-main package, results in: couldn't fetch $_TD
Previous Message Bruce Momjian 2012-03-16 19:13:40 Re: [BUGS] BUG #6532: pg_upgrade fails on Python stored procedures

Browse pgsql-general by date

  From Date Subject
Next Message Aleksey Tsalolikhin 2012-03-16 19:20:28 Re: A 154 GB table swelled to 527 GB on the Slony slave. How to compact it?
Previous Message Bosco Rama 2012-03-16 19:09:12 Re: Zero-length character breaking query?

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2012-03-16 19:51:35 Re: Command Triggers, v16
Previous Message Bruce Momjian 2012-03-16 19:13:40 Re: [BUGS] BUG #6532: pg_upgrade fails on Python stored procedures