Thread: Warning console code page (437) differs from Window code page (1252)
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