Skip to Content.
Sympa Menu

freetds - RE: [freetds] Character conversion issues

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "Chuck Bearden" <cfbearden AT gmail.com>, "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Cc:
  • Subject: RE: [freetds] Character conversion issues
  • Date: Fri, 29 Oct 2004 09:47:50 +0200

> On Thu, 28 Oct 2004 23:40:52 -0400, James K. Lowden
> <jklowden AT schemamania.org> wrote:
> > On Thu, 28 Oct 2004 22:12:59 -0500, Chuck Bearden
> <cfbearden AT gmail.com>
> > wrote:
> > > > > I can provide a TDSDUMP log of this if it would be helpful.
> > > >
> > > > You guessed it. ;-)
> > >
> > > Here it is:
> > >
> > > <http://acad24.sahs.uth.tmc.edu/tdslog/tdsdump.log.txt>
> >
> > Ach, du lieber. You didn't say you were passing UTF-8 as
> parameters to a
> > stored procedure. :-(
>
> Aber bitt' schön! I didn't realize I was. mx.ODBC must be invoking
> stored procedures behind my back. All I do is call an '.execute()'
> method on the mx.ODBC cursor with the SQL statement (placeholders for
> values) and a tuple of values as the two arguments. The code is on
> other machines, so I can't give you a sample at the moment.
>
> I'm guessing you are referring to 'sp_prepare' and
> 'sp_unprepare'--those are the only stored procedures I can identify in
> the trace log. I think that's how mx.ODBC prepares statements in a
> reusable way. Perhaps there is some way around that.
>
> > AIUI, there's some issue with iconv and parameter passing.
> Or was. There
> > was a thread on the subject recently. I don't see anything
> in ChangeLog.
> >
> > Please try with inline code to confirm that's the issue.
> Perhaps Frediano
> > will be able to shed some more light.
> >
> > > My only interest in UCS-2 was due to the hope that, if the server
> > > likes UCS-2, I could bypass conversion issues by feeding
> it UCS-2. If
> > > I can make the loading work with UTF-8 I'll be perfectly happy.
> >

Well.. let's revise the status of the art.
mxODBC use SQLDescribeParam to detect parameters type. However FreeTDS do not
support this function (mssql it's not that helpful in this case, you have to
parse statement and extract columns names and do some select to discover
types...). So mxODBC use CHAR. FreeTDS in this case use default coding of db.
If you pass Unicode to mxODBC execute mxODBC check stringformat and if
unicode it use W*CHAR for ODBC. This would solve your problems however it's
not still supported in FreeTDS :(

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page