Frage

I am trying to use PostgreSQL on Windows 8 using the command line provided by Git Bash so I can run Unix like commands. When accessing Postgres with the following command: psql -U postgres I get:

Warning: Console code page (850) differs from Windows code page (1252) etc...

in the Windows command tool, I just need to type chcp 1252 before accessing Postgres so the warning doesn't show up. What's the equivalent command in unix/git bash?

I tried to do chcp 1252 or chcp from Git bash but it outputs:

sh.exe": chcp: command not found

Any ideas?

War es hilfreich?

Lösung

Try "chcp.com 1252".

Git bash doesn't suppose ".com" as a implicit executable postfix. It can't expand "chcp" to correct executable, so you should type fully "chcp.com".

Andere Tipps

You're using the Windows psql.exe binary under the msys bash.

This may not work well, as psql.exe is a Win32 binary. It uses stdio, but not the same way bash expects.

You'll want to either use a psql built against msys (not trivial), or use psql under cmd.exe or powershell.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top