Home > Archive > Oracle PERL DBD > January 2006 > [svn:dbd-oracle] r2384 - dbd-oracle/trunk









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [svn:dbd-oracle] r2384 - dbd-oracle/trunk
timbo@cvs.perl.org

2006-01-11, 7:24 am

Author: 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 IMPLICIT.


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 neither 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) {
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com