Subject: | PL/SQL OUT values are not utf8 encoded |
As you will see by running the attached script, DBD::Oracle correctly encodes values returned
from a SELECT statement - no surprise there.
However executing effectively the same select in a PL/SQL block and returning the value via
bind_param_inout does not result in a valid utf8 string.
I have confirmed with Martin Evans that this issue exists in the latest svn trunk (as of 08-Feb-
12).
He suggested the following patch :
Index: dbdimp.c
=========================================================
==========
--- dbdimp.c (revision 15130)
+++ dbdimp.c (working copy)
@@ -3197,7 +3197,14 @@
if (SvPVX(sv)) {
SvCUR_set(sv, phs->alen);
*SvEND(sv) = '\0';
- SvPOK_only_UTF8(sv);
+ SvPOK_only_UTF8(sv);
+ if (CSFORM_IMPLIES_UTF8(SQLCS_IMPLICIT)) {
+#ifdef sv_utf8_decode
+ sv_utf8_decode(sv);
+#else
+ SvUTF8_on(sv);
+#endif
+ }
}
else { /* shouldn't happen */
debug = 2;
Thanks,
Steve
Subject: | sb2.plx |
Message body not shown because it is not plain text.