PostgreSQL driver DBD::Pg releases version 3.0.0

Ron Savage <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <[email protected]>
Hi

'Major change in UTF-8 handling' is right. I was:

o Declaring the Pg db as utf8

o Encoding outgoing data
Eg: map{($_ => encode('utf-8', $$hashref{$_}) )} keys %$hashref

o Decoding incoming data
$$item{$_} = decode('utf-8', $$item{$_} || '') for keys %$item

o Using <meta http-equiv="Content-Type" content="text/html; 
charset=utf-8" /> on my web page

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);

Gotta love utf8.

-- 
Ron Savage
http://savage.net.au/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.