Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id C620819964F2 for ; Fri, 16 Mar 2012 16:14:01 -0300 (ADT) Received: from 30.55.colo.spiretech.net ([69.168.55.30] helo=lists.commandprompt.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S8cb9-0004M6-Kq for pgsql-bugs@postgresql.org; Fri, 16 Mar 2012 19:14:00 +0000 Received: from perhan.alvh.no-ip.org (spinlock.commandprompt.com [69.168.55.30]) by lists.commandprompt.com (Postfix) with ESMTPA id EEBAEED; Fri, 16 Mar 2012 12:14:33 -0700 (PDT) Received: from perhan.alvh.no-ip.org ([200.126.81.219] helo=perhan.alvh.no-ip.org) by assp.commandprompt.com with ESMTPS(AES256-SHA) (2.1.1); 16 Mar 2012 12:14:31 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 3DE066E478; Fri, 16 Mar 2012 16:13:41 -0300 (CLST) Content-Type: text/plain; charset=UTF-8 Cc: Pg Bugs Subject: Re: BUG #6510: A simple prompt is displayed using wrong charset From: Alvaro Herrera To: exclusion In-reply-to: References: Date: Fri, 16 Mar 2012 16:13:41 -0300 Message-Id: <1331925178-sup-9261@alvh.no-ip.org> User-Agent: Sup/git X-Assp-Version: 2.1.1(11364) on assp.commandprompt.com X-Assp-Client-TLS: yes X-Assp-ID: assp.commandprompt.com m1-25273-05609 X-Assp-Envelope-From: alvherre@alvh.no-ip.org X-Assp-Intended-For: exclusion@gmail.com X-Assp-Original-Subject: Re: [BUGS] BUG #6510: A simple prompt is displayed using wrong charset Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201203/124 X-Sequence-Number: 32685 Excerpts from exclusion's message of s=C3=A1b 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. >=20 > 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 pag= e > obtained from the operating system. >=20 > After the call all the strings printed with the printf(stdout) will go > through the ANSI->OEM conversion. >=20 > But in the simple_prompt function strings written to con, and such writ= es go > without conversion. Were you able to come up with some way to make this work? --=20 =C3=81lvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support