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{$_} || ''):

> 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.

Reply via email to