最近把shp格式地图导入进Postgresql数据库,但是,问题出现了:
BEGIN
PSQL:green.sql:4: ERROR:  invalid byte sequence for encoding "UTF8": 0xd0f2
HINT:  This error can also happen if the byte sequence does not match the encodi
ng expected by the server, which is controlled by "client_encoding".
PSQL:green.sql:5: ERROR:  current transaction is aborted, commands ignored until
 end of transaction block
PSQL:green.sql:6: ERROR:  invalid byte sequence for encoding "UTF8": 0xd0f2
HINT:  This error can also happen if the byte sequence does not match the encodi
ng expected by the server, which is controlled by "client_encoding".
ROLLBACK
字符序列与UTF-8不匹配请高手指点,谢谢。

解决方案 »

  1.   

    参考
    http://bbs.chinaunix.net/thread-955931-1-8.html
      

  2.   

    字符编码问题。
    可能原因是你的数据库是utf-8的,默认设置的是client_code也是utf-8
    而你写入的确不是。
    两种办法,将client_code改变还有就是改变写入的sql编码方式。
    估计你用的是shapefiletopostgre.exe,它是生成sql脚本的,如果你没有其他应用,
    可以把数据库改成sql_ascii
      

  3.   


    我写入的字符编码也是UTF-8,但是同样的数据发给朋友可以执行,都是UTF-8格式编码
    纳闷呢。