Perl and Postgresql: Invalid byte sequence for encoding "UTF8"

http://www.perlmonks.org/?node_id=591180 encode( “UTF-8”, $possibly_bad_utf8_data );

Unicode-processing issues in Perl and how to cope with it (ahinea.com)

http://ahinea.com/en/tech/perl-unicode-struggle.html some tips on how to handle UTF8 in perl