문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top