in reply to Re: Re: Encoding of DBI PostgreSQL output
in thread Encoding of DBI PostgreSQL output
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
|
|---|