warning about console code page on starting psql

From: Scott Robertson <stumpednomore(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: warning about console code page on starting psql
Date: 2014-12-17 04:10:42
Message-ID: 54910242.3090706@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-novice

SUMMARY OF PROBLEM: Postgres notes no errors upon installation, but upon
startup of psql there's a warning; documentation fix doesn't eliminate
the warning message.

1. psql says this when I log in:

Server [localhost]:

Database [postgres]:

Port [5432]:

Username [postgres]:

Password for user postgres:

psql (9.4rc1)

WARNING: Console code page (437) differs from Windows code page (1252)

8-bit characters might not work correctly. See psql reference

page "Notes for Windows users" for details.

Type "help" for help.

postgres=#

2. psql ref. pg. says this:

*Notes for Windows Users*

psql is built as a "console application". Since the Windows console
windows use a different encoding than the rest of the system, you must
take special care when using 8-bit characters within psql. If psql
detects a problematic console code page, it will warn you at startup. To
change the console code page, two things are necessary:

* 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.

Set the console font to Lucida Console, because the raster font does not
work with the ANSI code page.

3. When I enter "cmd.exe /c chcp 1252" into the command prompt, it says
this:

Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\zzzzzz>cmd.exe /c chcp 1252

Active code page: 1252

C:\Users\zzzzzz>

4. Am I supposed to type this at the command prompt: "cmd.exe /c chcp
437"? Because that's what I did, and now the command prompt says this...

C:\Users\zzzzzz>cmd.exe /c chcp 437

Active code page: 437

C:\Users\zzzzzz>

...but I quit and reopened psql, the error message isn't gone or changed.

5. The instructions to set console font mean nothing to me: "Set the
console font to Lucida Console, because the raster font does not work
with the ANSI code page". Googled it and found nothing that made sense
to me. Set whose console font? PG or Windows? Where and how to set it?
What is a console, anyway? Googled again and again, finally discovered
that the console being referred to is apparently psql itself. By
clicking on the little rectangular icon at the top left of the title bar
of the command prompt (psql), Properties, Font...there it is. "Raster
Fonts" had been selected. I changed this to Lucida Console. Quit psql
and restarted it.

6. psql startup warning has now changed to a different font, no other
change.

7. I changed the console page back to 1252 in the command prompt:

Microsoft Windows [Version 6.1.7600]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\zzzzz>cd/

C:\>cmd.exe /c chcp 1252

Active code page: 1252

C:\>

8. Quit and restarted psql (twice). The warning message has not changed.
Is it possible that pg is wrongly detecting code page 437, and does it
matter? I have a lot of work to do and want a sparkling clean foundation
to start from so I don't have problems later.

--
stumpednomore(at)gmail(dot)com

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Stephen Cook 2014-12-17 05:26:02 Re: warning about console code page on starting psql
Previous Message Peter Eisentraut 2014-12-15 01:08:08 Re: Documenting timezone setting in initdb

Browse pgsql-novice by date

  From Date Subject
Next Message Stephen Cook 2014-12-17 05:26:02 Re: warning about console code page on starting psql
Previous Message David G Johnston 2014-12-17 03:35:24 Re: Yet another binary vs. text question (with a twist?)