in reply to Re: Re: Encoding of DBI PostgreSQL output
in thread Encoding of DBI PostgreSQL output

Found the answer (for my problem, anyway) here:
http://www.perldoc.com/perl5.8.0/pod/perluniintro.html#Displaying-Unicode-As-Text
and adapted it to solve my need thus:
sub hexent { my $utf8=shift; # convert utf8 characters greater than 255 into hex entities my $mapped=join("", map { $_ > 255 ? sprintf("&#x%04X;", $_) : chr +($_) } unpack("U*", $utf8));; return $mapped; }

Four of hardest-to-understand Perl function in one command line!

Hope this helps you with your problem ...

AndyH