Hi Tim
On 06/02/14 23:48, Tim Bunce wrote:
On Thu, Feb 06, 2014 at 12:30:15PM +1100, Ron Savage wrote:
Eg: map{($_ => encode('utf-8', $$hashref{$_}) )} keys %$hashref
$$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item
Performance tip: using the function form of encode() and decode()
is significantly slower than using the method call form:
$utf8_encoding->decode($$item{$_} || ''):
So, first call my($utf8_encoding) = find_encoding('utf-8'), eh?
$many x $thanx;
And each module tested under V 3.0.0 broke.
But a 1-line change fixes them:
$$attr{pg_enable_utf8} = 0 if ($$config{dsn} =~ /dbi:Pg/i);
Sweet.
Gotta love utf8.
:)
Tim.
--
Ron Savage
http://savage.net.au/