Java OpenResty Spring Spring Boot MySQL Redis MongoDB PostgreSQL Linux Android Nginx 面试 小程序 Arthas JVM AQS juc Kubernetes Docker 诊断工具


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

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

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb

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

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