pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-novice@postgresql.org
Subject: Re: warning about console code page on starting psql
Date: Tue, 16 Dec 2014 22:55:07 -0700 (MST)
Message-ID: <1418795707357-5831042.post@n5.nabble.com> (raw)
In-Reply-To: <549113EA.2010007@gmail.com>
References: <54910242.3090706@gmail.com>
	<549113EA.2010007@gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-novice>

Stephen Cook-2 wrote
> On 12/16/2014 11:10 PM, Scott Robertson wrote:
>> Set the code page by entering cmd.exe /c chcp 1252. (1252 is a code 
>> page that is appropriate for German; replace it with your value.) If 
>> you are using Cygwin, you can put this command in /etc/profile.
> 
> Do not type the "cmd.exe /c" part. This will run a new instance of "cmd" 
> (the Windows command-line console); "\c" means "run the following 
> command"... So you are basically starting a new console, changing the 
> code page within that new console, and exiting back to your original 
> console.
> 
> Instead, once you have a command prompt, use "chcp 1252" to change the 
> code page of the Windows console to match the code page "psql" expects 
> from Windows. Then you can run "psql" without the warning. You will have 
> to do this each time you open a new command line console, before running 
> "psql", as far as I can tell.
> 
> -- Stephen

So basically the documented fix is useless.  At least a "/k" would keep the
new console with altered code page around for interactive use but the /c
switch simply kills the console after running a single command whose sole
purpose is to change the to-be-killed console's codepage.

It is implied that since you are chasing the console codepage that the
target value would be whatever Window's is using...but that could be made
more clear as well.

Encodings are confusing and this doesn't even mention using windows psql
against Linux or how Unicode would fit in - though external notes indicate
that the font change suggestion also solves Unicode characters as well as
dealing with ANSI...

http://ss64.com/nt/chcp.html

David J.





--
View this message in context: http://postgresql.nabble.com/warning-about-console-code-page-on-starting-psql-tp5831036p5831042.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


-- 
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice



view thread (11+ messages)  latest in thread

Message-ID: <1418795707357-5831042.post@n5.nabble.com>
Permalink:  ../1418795707357-5831042.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1418795707357-5831042.post@n5.nabble.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: david.g.johnston@gmail.com, pgsql-novice@postgresql.org
  Subject: Re: warning about console code page on starting psql
  In-Reply-To: <1418795707357-5831042.post@n5.nabble.com>

* 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