我正在使用 psql 并意识到德语字母 ä、ö、ü 未正确显示。例如,ö 显示为 õ。 ü 在指数中显示为三...
WARNING: Console code page (850) differs from Windows code page
(1252) 8-bit characters might not work correctly. See psql
reference page "Notes for Windows users" for details.
我该如何改变?
操作系统:Windows 10 psql 13.3
我导入到 postgres 的表是用 UTF8 编码的。
我是 postgres 和 psql 的新手,很抱歉问这个愚蠢的问题。
在第二个打印屏幕中,您可以看到“Eigentümer”、“Zürich”和“Graubünden”中的字符“ü”显示不正确。
答案 0 :(得分:1)
我遇到了同样的问题;只需使用
<块引用>\encoding 'UTF8'
答案 1 :(得分:0)
从命令行或终端:
chcp 1252
打开 psql
psql -U postgres
设置客户端编码:
SET client_encoding='WIN1252'
导入文件:
\i Path/to/your/.sqlFile