Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesAuthor: timbo
Date: Wed Jan 11 04:02:11 2006
New Revision: 2384
Modified:
dbd-oracle/trunk/dbdimp.c
Log:
When binding a utf8 value without an explicit csform, prefer NCHAR over IMPL
ICIT.
Modified: dbd-oracle/trunk/dbdimp.c
====================
====================
====================
================
==
--- dbd-oracle/trunk/dbdimp.c (original)
+++ dbd-oracle/trunk/dbdimp.c Wed Jan 11 04:02:11 2006
@@ -1332,13 +1332,16 @@ dbd_rebind_ph(SV *sth, imp_sth_t *imp_st
if (!csform && SvUTF8(phs->sv)) {
/* try to default csform to avoid translation through non-unicode */
- if (CSFORM_IMPLIES_UTF8
(SQLCS_IMPLICIT)) /* prefer implicit */
- csform = SQLCS_IMPLICIT;
- else if (CSFORM_IMPLIES_UTF8
(SQLCS_NCHAR))
+ if (CSFORM_IMPLIES_UTF8
(SQLCS_NCHAR)) /* prefer NCHAR */
csform = SQLCS_NCHAR;
- else if (trace_level) /* leave csform == 0 */
- PerlIO_printf(DBILOG
FP, " rebinding %s with UTF8 value but neith
er CHAR nor NCHAR are unicode\n",
- phs->name);
+ else if (CSFORM_IMPLIES_UTF8
(SQLCS_IMPLICIT))
+ csform = SQLCS_IMPLICIT;
+ /* else leave csform == 0 */
+ if (trace_level)
+ PerlIO_printf(DBILOG
FP, " rebinding %s with UTF8 value %s", phs-
>name,
+ (csform == SQLCS_NCHAR) ? "so setting csform=SQLCS_IMPLICI
T" :
+ (csform == SQLCS_IMPLICIT) ? "so setting csform=SQLCS_NCHAR" :
+ "but neither CHAR nor NCHAR are unicode\n");
}
if (csform) {
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread