[DBD::Pg 1/2] Don't flip the utf8 flag on when we are unrolling arrays of bytea. First step in solving bug # 91454
dbdpg-commits-gENoVmVU/[email protected] Sun, 26 Jan 2014 08:49:10 -0500
| Newsgroups | gmane.comp.db.postgresql.dbdpg.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by Greg Sabino Mullane <greg-O9fzpki4YnJWk0Htik3J/[email protected]> Subject: [DBD::Pg 1/2] Don't flip the utf8 flag on when we are unrolling arrays of bytea. First step in solving bug # 91454 --- dbdimp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dbdimp.c b/dbdimp.c index eb411a0..247aa2a 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -2753,7 +2753,8 @@ static SV * pg_destringify_array(pTHX_ imp_dbh_t *imp_dbh, unsigned char * input av_push(currentav, newSViv('t' == *string ? 1 : 0)); else { SV *sv = newSVpvn(string, section_size); - if (imp_dbh->pg_utf8_flag) { + if (0 != strncmp(coltype->type_name, "_bytea", 6) + && imp_dbh->pg_utf8_flag) { SvUTF8_on(sv); } av_push(currentav, sv); -- 1.8.4