Character with byte sequence 0x9d in encoding ‘WIN1252’ has no equivalent in encoding ‘UTF8’

The problem is that 0x9D is not a valid byte value in WIN1252.
There’s a table here: https://en.wikipedia.org/wiki/Windows-1252

The problem may be that you are importing a UTF-8 file and postgresql is defaulting to Windows-1252 (which I believe is the default on many windows systems).

You need to change the character set on your windows command line before running the script with chcp. Or in postgresql you can:

SET CLIENT_ENCODING TO 'utf8';

Before importing the file.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)