And the way to deal with this? Any ideas on that? Whether changing encoding to utf-8 in dump work?
Yes, run initdb -E SQL_ASCII
This will create your database cluster with no encoding restrictions. Whether this is a good thing or a bad thing depends on circumstances (it's usually not desirable) but in your case it may be a good thing.