PostgreSQL: character with byte sequence 0xc2 0x81 in encoding “UTF8” has no equivalent in encoding “WIN1252”

前端 未结 4 1735
夕颜
夕颜 2020-12-31 07:33

Getting the below exception while executing SELECT query for a particular row on that table

ERROR:  character with byte sequence 0xc2 0x81 in en         


        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-31 07:55

    see here

    I've encountered this error "ERROR: character with byte sequence <...> in encoding "UTF8" has no equivalent in encoding "WIN1252";" while using MySQL Workbench to migrate data from PostgreSQL to MySQL. I was not sure why this was happening because the target MySQL database had UTF8 encoding and I thought that everything can be mapped to it.

    The real root cause of this problem turned out to be the PostgreSQL driver I used to connect to the source DB and specified in the Workbench which was PostgreSQL ODBC Driver (ANSI) and after I changed it to PostgreSQL ODBC Driver (UNICODE) everything worked fine.

提交回复
热议问题