in reply to encoding issues

The db is set to default encoding LATIN1 While doing a copy to the db i set the client encoding to UTF8

Why? Why introduce a mismatch by using a different client encoding than the database wants?

It sounds a bit like "I have this airport, but when I try to steer ships to it, they hit a channel wall."

Perl 6 - links to (nearly) everything that is Perl 6.