Author: turnstep
Date: Sun Nov 30 14:06:55 2008
New Revision: 12119
Modified:
DBD-Pg/trunk/Changes
DBD-Pg/trunk/dbdimp.c
Log:
Test inside of arrays for UTF8ness before copying as such.
Patch by Armando Santos per bug 41253.
Modified: DBD-Pg/trunk/Changes
==============================================================================
--- DBD-Pg/trunk/Changes (original)
+++ DBD-Pg/trunk/Changes Sun Nov 30 14:06:55 2008
@@ -1,5 +1,10 @@
('GSM' is Greg Sabino Mullane, [email protected])
+2.11.6
+
+ - Only set UTF8 flag on array items after UTF8 test. (CPAN bug #41253)
+ [Armando Santos]
+
2.11.5 Released November 24, 2008 (subversion r12102)
- Clear prepared_statement name on failure to prepare: prevents
Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c (original)
+++ DBD-Pg/trunk/dbdimp.c Sun Nov 30 14:06:55 2008
@@ -2211,7 +2211,7 @@
quotedval = pg_stringify_array(newvalue,",",imp_dbh->pg_server_version);
currph->valuelen = sv_len(quotedval);
Renew(currph->value, currph->valuelen+1, char); /* freed in dbd_st_destroy */
- currph->value = SvPVutf8_nolen(quotedval);
+ currph->value = SvUTF8(quotedval) ? SvPVutf8_nolen(quotedval) : SvPV_nolen(quotedval);
currph->bind_type = pg_type_data(PG_CSTRINGARRAY);
is_array = DBDPG_TRUE;
}
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.