Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y15xH-0000jX-SL for pgsql-novice@arkaria.postgresql.org; Wed, 17 Dec 2014 04:11:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y15xG-0005CI-L6 for pgsql-novice@arkaria.postgresql.org; Wed, 17 Dec 2014 04:11:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y15xF-0005CB-EI for pgsql-novice@postgresql.org; Wed, 17 Dec 2014 04:11:17 +0000 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y15x6-0006th-GJ for pgsql-novice@postgresql.org; Wed, 17 Dec 2014 04:11:16 +0000 Received: by mail-pd0-f180.google.com with SMTP id w10so15312016pde.11 for ; Tue, 16 Dec 2014 20:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=T7ZXXwS2L7yaDfoqG4Lok9jx3MxaLYAcrtX11V1bqIs=; b=iFGCG2OQjtD5Rer4j1qxSJQbfY6LQIG80sPAa7ZpV/TVR/fNCPB5q28M/qdGVFtPE+ YLfBfemuCO7Xa5+Rw6iBESLEx/mKvvP1zQj88XcAksd50VzUtwjyo/+uW8/NJ3rzazbI DeCJXkWLWLlILBKxhyysssr6+Xm0mIluUCekR5DVwFCtSzyXUnVGRNysj09DPKoLGkHN c/53KZfp4KpIJmpQ+EcIBPbWGBW9Li0NyWbBvi+c9GvbbwwK2cnszFZFbsRw+9P9WDTf dqOZT+OITToGebuuWrT4VpTvdP+Vl4/z89yBE9HfRoQlWP/JYVafltCexAFiTIsGr2QN MBFA== X-Received: by 10.68.203.130 with SMTP id kq2mr66996652pbc.1.1418789463876; Tue, 16 Dec 2014 20:11:03 -0800 (PST) Received: from [127.0.0.1] ([121.54.58.132]) by mx.google.com with ESMTPSA id k3sm2471709pdj.2.2014.12.16.20.10.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 20:11:02 -0800 (PST) Message-ID: <54910242.3090706@gmail.com> Date: Wed, 17 Dec 2014 12:10:42 +0800 From: Scott Robertson User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: pgsql-novice@postgresql.org Subject: warning about console code page on starting psql Content-Type: multipart/alternative; boundary="------------030903040600090801070507" X-Antivirus: avast! (VPS 141216-2, 12/17/2014), Outbound message X-Antivirus-Status: Clean X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-novice Precedence: bulk Sender: pgsql-novice-owner@postgresql.org This is a multi-part message in MIME format. --------------030903040600090801070507 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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@gmail.com --- This email has been checked for viruses by Avast antivirus software. http://www.avast.com --------------030903040600090801070507 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

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@gmail.com



This email has been checked for viruses by Avast antivirus software.
www.avast.com


--------------030903040600090801070507--