Subject: | More of a solution than a bug report - re UTF handling in DBD::PG within arrayrefs |
Date: | Thu, 27 Nov 2008 00:22:33 +0000 |
To: | bug-DBD-Pg [...] rt.cpan.org |
From: | Armando Santos <ajs [...] binarios.com> |
I'm sorry I don't have the time to present a complete bug report,
however the problem and solution should be obvious from the following.
Also, I'm not at all conversant with the ins and outs of DBD drivers and
such, so please read this with a generous grain of salt.
Referencing DBDB-Pg-2.11.5, file dbdimp.c, line 2214, which is
currph->value = SvPVutf8_nolen(quotedval);
I changed it in my installation to:
currph->value = SvUTF8(quotedval) ? SvPVutf8_nolen(quotedval) :
SvPV_nolen(quotedval);
Now, it seems that arrays get the same treatment as non-array fields. My
database is LATIN1, and there was a important difference between writing
to a 'text' field and a 'text[]' field.
Is it ok?
Please note that I don't follow the mailist or bug reporting site, so
I'll simply check the next version.
Thank you and keep up the good work.
Armando