Re: UTF-8 encoding problem with $DBI::errstr

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----                          
Hash: RIPEMD160                                             
NotDashEscaped: You need GnuPG to verify this message       


> There seems to be something wrong with the UTF-8 encoding of
> $DBI::errstr.                                               

Thank you for the report, and thank you for providing a self-contained 
testing script! I've assigned a bug to this problem:                   

https://rt.cpan.org/Ticket/Display.html?id=53854

The bug has been fixed in subversion r13749. If you would like 
to confirm the fix locally, it's a small patch to the
dbdimp.c file:

Index: dbdimp.c
===================================================================
--- dbdimp.c    (Revision 13667)
+++ dbdimp.c    (Arbeitskopie)
@@ -271,6 +271,10 @@
        sv_setpvn(DBIc_ERRSTR(imp_xxh), error_msg, error_len);
        sv_setpv(DBIc_STATE(imp_xxh), (char*)imp_dbh->sqlstate);

+       /* Set as utf-8 */
+       if (imp_dbh->pg_enable_utf8)
+               SvUTF8_on(DBIc_ERRSTR(imp_xxh));
+
        if (TEND) TRC(DBILOGFP, "%sEnd pg_error\n", THEADER);

 } /* end of pg_error */


Thanks again, this will most likely go out soon in version 2.16.1.

--
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201001201409
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAktXVT0ACgkQvJuQZxSWSsj1VwCaAkj4Nsq9KchHiQPFmUwKdqcq
tpIAoLghOYmPNsRiLkXQomxMqTXRDfDO
=xfiA
-----END PGP SIGNATURE-----
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.