sql - PostgreSQL 9.5 ERROR: invalid byte sequence for encoding "UTF8": 0xc3 0xee -


recently migrated databases postgresql version 8.4 on debian 5 postgresql version 9.5 on different server running centos 6.5 using pg_dump , pg_restore utilities. database's encoding sql_ascii tables contain huge encoded data. remaining databases seems work normally, specific one.

when try fetch data database on new server receive:

megaart_www=# select * data_tbl limit 10; error:  invalid byte sequence encoding "utf8": 0xc1 0xe0

to sure configurations on both server identical run these commands. results identical.

postgres=# show client_encoding;  client_encoding  -----------------  utf8 (1 row)
 postgres=# show server_encoding;  server_encoding  -----------------  utf8 (1 row) 

database's encoding:

megaart_www=# show server_encoding;  server_encoding  -----------------  sql_ascii (1 row) 

database server configurations identical, continue receive errors.

so server_encoding sql_ascii on new server, client_encoding utf8? it's saying utf8 doesn't know translation bytes. imagine if make client_encoding match: set client_encoding = 'sql_ascii' , repeat query, work fine. whether want data stored sql_ascii, that's question need answer.

server encoding configured @ instance creation time, if need match old server aka utf8, you'll need recreate instance , reload data. client encoding can changed @ session level. it's translation of these 2 parameters causes errors.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -