Subject: | Errors needs to be slung around as SVs and respect UTF8 flag |
We received a DBD::Pg bug about the UTF8 flag not being on when errors are thrown. After some debugging, it was found that it was turned on, and the correct SV was created for DBIc_ERRSTR, but that DBI copied it to a new sv without checking the flag (SV was "msg"), and then it calls croak(msg), which further prevents the flag from being kept. So it looks like two things are required: making sure that DBI keeps the flag when copying the SVs around, and using the new corak_sv when possible (obviously requires a version check, as it has been reported this is only available on Perl 5.14).