[svn:DBD-Pg] r13749 - DBD-Pg/trunk

[email protected]
Newsgroups gmane.comp.db.postgresql.dbdpg.cvs
Message-ID <[email protected]>
Author: turnstep
Date: Wed Jan 20 11:08:51 2010
New Revision: 13749

Modified:
   DBD-Pg/trunk/dbdimp.c

Log:
Error messages should be UTF-8 enabled as needed. (CPAN bug #53854)


Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c	(original)
+++ DBD-Pg/trunk/dbdimp.c	Wed Jan 20 11:08:51 2010
@@ -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 */
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.