PostgreSQL 使用 \copy 命令时报 character with byte sequence 0xc3 0xa5 in encoding "UTF8" has no equivalent in encoding "GBK"

PostgreSQL 大约 308 字

错误信息

ERROR:  character with byte sequence 0xc3 0xa5 in encoding "UTF8" has no equivalent in encoding "GBK"

解决方法

导出时指定encodingutf8

\copy (select * from test_table) to 'C:/data.csv' (FORMAT 'csv', DELIMITER ',', HEADER true, NULL 'UNKOWN', ENCODING 'UTF8')

参考

https://www.postgresql.org/docs/11/sql-copy.html

阅读 4108 · 发布于 2019-08-07

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
随便看看 换一批