首页 > 数据库技术 > 详细

PostgreSql sql shell win10 下乱码解决

时间:2017-09-22 17:03:57      阅读:322      评论:0      收藏:0      [点我收藏+]

重现步骤:

打开 SQL Shell (psql)

1 Server [localhost]:
2 Database [postgres]:
3 Port [5432]:
4 Username [postgres]:
5 psql (9.6.2)
6 ê?è? "help" à′??è?°??úD??¢.
7 
8 postgres=#

解决办法:

打开环境变量窗口

cmd
rundll32 sysdm.cpl,EditEnvironmentVariables

设置环境变量

Path = PostgreSQL\9.6\bin (Add to existing system path)
PGCLIENTENCODING = UTF8

 

打开命令行

cmd.exe
chcp 65001

然后,再登陆

psql -U postgres postgres

 

至此问题解决。 为了方便后续使用, 在桌面上面创建一个 【openPsql.bat】 文件, 加入下面的内容,这样下次使用的时候,直接双击即可。

chcp 65001
psql -U postgres postgres

 

PostgreSql sql shell win10 下乱码解决

原文:http://www.cnblogs.com/shareforever-999/p/7575604.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!