--- sql/oracle/parser3oracle.C 2004/03/04 09:10:13 1.52 +++ sql/oracle/parser3oracle.C 2004/03/26 13:26:41 1.54 @@ -7,7 +7,7 @@ 2001.07.30 using Oracle 8.1.6 [@test tested with Oracle 7.x.x] */ -static const char *RCSId="$Id: parser3oracle.C,v 1.52 2004/03/04 09:10:13 paf Exp $"; +static const char *RCSId="$Id: parser3oracle.C,v 1.54 2004/03/26 13:26:41 paf Exp $"; #include "config_includes.h" @@ -420,18 +420,20 @@ public: SQL_Driver_query_event_handlers& handlers) { Connection& connection=*static_cast(aconnection); + const char* cstrClientCharset=connection.options.cstrClientCharset; OracleSQL_query_lobs lobs={{0}, 0}; OCIStmt *stmthp=0; SQL_Driver_services& services=*connection.services; // transcode from $request:charset to connect-string?client_charset - size_t transcoded_statement_size; - if(const char* cstrClientCharset=connection.options.cstrClientCharset) + if(cstrClientCharset) { + size_t transcoded_statement_size; services.transcode(astatement, strlen(astatement), astatement, transcoded_statement_size, services.request_charset(), cstrClientCharset); + } bool failed=false; if(setjmp(connection.mark)) { @@ -650,6 +652,7 @@ private: // private funcs OCIStmt *stmthp, unsigned long offset, unsigned long limit, SQL_Driver_query_event_handlers& handlers) { + const char* cstrClientCharset=connection.options.cstrClientCharset; SQL_Driver_services& services=*connection.services; ub4 prefetch_rows=100; @@ -705,7 +708,7 @@ private: // private funcs (dvoid**) &col_name, (ub4 *) &col_name_len, (ub4)OCI_ATTR_NAME, (OCIError *)connection.errhp)); // transcode to $request:charset from connect-string?client_charset - if(const char* cstrClientCharset=connection.options.cstrClientCharset) { + if(cstrClientCharset) { services.transcode(col_name, col_name_len, col_name, col_name_len, cstrClientCharset, @@ -824,16 +827,11 @@ private: // private funcs if(str && length) { // transcode to $request:charset from connect-string?client_charset - if(const char* cstrClientCharset=connection.options.cstrClientCharset) { - const char* dest; - size_t dest_length; + if(cstrClientCharset) services.transcode(str, length, - dest, dest_length, + str, length, cstrClientCharset, services.request_charset()); - str=dest; - length=dest_length; - } } check(connection, handlers.add_row_cell(connection.sql_error, str, length));