pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: exclusion <exclusion@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset
Date: Fri, 16 Mar 2012 16:13:41 -0300
Message-ID: <1331925178-sup-9261@alvh.no-ip.org> (raw)
In-Reply-To: <E1S3twb-0004OY-4g@wrigleys.postgresql.org>
References: <E1S3twb-0004OY-4g@wrigleys.postgresql.org>


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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (26+ messages)  latest in thread

Message-ID: <1331925178-sup-9261@alvh.no-ip.org>
Permalink:  ../1331925178-sup-9261@alvh.no-ip.org/
Also on:    postgresql.org/message-id/1331925178-sup-9261@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@commandprompt.com, exclusion@gmail.com
  Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset
  In-Reply-To: <1331925178-sup-9261@alvh.no-ip.org>
  References: <E1S3twb-0004OY-4g@wrigleys.postgresql.org> <1331925178-sup-9261@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox