New answers tagged encoding
Mangled text encoding dumps are a pain to work with. The usual - and admittedly crude - solution is to run iconv on the SQL-format dump, with the -c flag to tell it to omit characters that are invalid in the target encoding. This is only viable if the origin database is supposedly in one primary encoding, and just has a bit of bad data here and there due ...
You can use uchardet to determine the encoding: https://code.google.com/p/uchardet/ Then use iconv, possibly with -c, to convert between encodings: http://www.documentroot.com/2013/12/utf8-encoding-and-postgres-dump.html
Top 50 recent answers are included