in reply to Re^2: Perl and Postgresql: Invalid byte sequence for encoding "UTF8"
in thread Perl and Postgresql: Invalid byte sequence for encoding "UTF8"

It is NOT the capitalization that is needed. Encode is case-insensitive for the encoding. It is the hyphen that makes the difference, see this example:
use Encode qw(resolve_alias); my @aliases = ('utf-8', 'UTF-8', 'utf8',); for my $alias ( @aliases ) { my $canonical_name = Encode::resolve_alias($alias); print "$alias \t has canonical name $canonical_name\n"; }
  • Comment on Re^3: Perl and Postgresql: Invalid byte sequence for encoding "UTF8"
  • Download Code