If encoding is not specified in the pg_dump command, we get an error as follows.
ERROR: character with byte sequence 0xd0 0x9c in encoding “UTF8”
has no equivalent in encoding “WIN1252”
Solution :
We edit the command as below and get the dump again.
1 2 |
pg_dump — format=t — encoding=UTF-8 — schema=melek testdb> /backup/dump/melek.tar |
Or the client_encoding is changed.
*We are displaying client_encoding.
1 2 3 4 5 |
testdb=> show client_encoding; client_encoding — — — — — — — — - WIN1252 (1 row) |
*We set client_encoding to UTF8. After the adjustment, we can successfully dump.
1 2 |
testdb=> SET client_encoding = ‘UTF8’; SET |