Warning console code page (437) differs from Window code page (1252)

Поиск
Список
Период
Сортировка
От John
Тема Warning console code page (437) differs from Window code page (1252)
Дата
Msg-id 0C1D4413D55F44F9B93E6245B230870D@user3
обсуждение исходный текст
Список pgsql-novice
Just a note for Windows users
I had a drama with psql (only \x commands worked -- probably self made)
At boot up this psql warning appeared
Warning console code page (437) differs from Window code page (1252)
 
I found the runsql.bat file and added
cmd.exe /c chcp 0437
 
 to the top and saved it
 
When run the runsql.bat file reset the code page, returned
"Active code page 437",
got rid of the warning and psql began working (coincidence?)
 
The bat file and system particulars follow below.
Thanks all John Coffey
 
---------------------------------------------------------------------------------------------

Database

Instalation file    postgresql-9.1.3-1-windows.exe

           

Postgresql =#SELECT version();

 

PostgreSQL 9.1.3, complied by Visual C++ build 1500, 32 bit

========================== 

Operating System

Windows XP version 5.1 (build 2600.xpsp.080413-2111: Service Pack 3)

Copyright 2007

 ----------------------------------------------------

runsql.bat

@echo on

REM Coffey Set window codepage to legacy 437 to circumvent warning

REM Warning console code page (437) differs from Window code page (1252)

cmd.exe /c chcp 0437

 

 

REM PostgreSQL server psql runner script for Windows

REM Dave Page, EnterpriseDB

 

SET server=localhost

SET /P server="Server [%server%]: "

 

SET database=postgres

SET /P database="Database [%database%]: "

 

SET port=5432

SET /P port="Port [%port%]: "

 

SET username=postgres

SET /P username="Username [%username%]: "

 

for /f "delims=" %%a in ('chcp ^|find /c "932"') do @ SET CLIENTENCODING_JP=%%a

if "%CLIENTENCODING_JP%"=="1" SET PGCLIENTENCODING=SJIS

if "%CLIENTENCODING_JP%"=="1" SET /P PGCLIENTENCODING="Client Encoding [%PGCLIENTENCODING%]: "

 

REM Run psql

"C:\Program Files\PostgreSQL\9.1\bin\psql.exe" -h %server% -U %username% -d %database% -p %port%

 

pause

 

В списке pgsql-novice по дате отправления:

Предыдущее
От: Nicholas Wilson
Дата:
Сообщение: converting 1 dimensional array to 2 dimensional array
Следующее
От: James Martens
Дата:
Сообщение: Updating RHEL4 system for PHP; requires Postgresql updates