写特殊符号时postgresql错误

时间:2012-11-21 07:01:31

标签: postgresql

当我尝试将这两个单词写入postgresql

时,我收到了错误

MetroÂ
逻辑的

ERROR:  invalid byte sequence for encoding "UTF8": 0xa0
HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

ERROR:  invalid byte sequence for encoding "UTF8": 0x92
HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

1 个答案:

答案 0 :(得分:1)

您输入的编码不是UTF-8。如果我用例如在psql中插入ISO-8859-1文件,我可以重现这种行为。 您应该更改输入编码。