我正在尝试使用 Git Bash 提供的命令行在 Windows 8 上使用 PostgreSQL,这样我就可以运行类似 Unix 的命令。当使用以下命令访问 Postgres 时:psql -U postgres
我得到:
Warning: Console code page (850) differs from Windows code page (1252) etc...
在 Windows 命令工具中,我只需要在访问 Postgres 之前键入 chcp 1252
就不会出现警告。 unix/git bash 中的等效命令是什么?
我尝试从 Git bash 执行 chcp 1252
或 chcp
但它输出:
sh.exe": chcp: command not found
有什么想法吗?
最佳答案
尝试“chcp.com 1252”。
Git bash 不将“.com”假定为隐式可执行后缀。 它无法扩展“chcp”以更正可执行文件,因此您应该完整键入“chcp.com”。
关于windows - 如何将控制台代码更改为 1252?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23213484/