Skip site navigation (1) Skip section navigation (2)

MAC OSX copy_and_convert_field bug for SQL_W_CHAR

From: "Joel Kiger" <kiger(dot)joel(at)cimcor(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: MAC OSX copy_and_convert_field bug for SQL_W_CHAR
Date: 2005-10-20 13:46:38
Message-ID: HCEBICIPILCHNGDLHKGJOEEOCIAA.kiger.joel@cimcor.com (view raw or flat)
Thread:
Lists: pgsql-odbc
I am currently using Postgre 8.0 with the 8.00.0102 ODBC driver with IODBC
3.52.2.  I can not get SQLGetData to return any valid data when the Ctype is
SQL_W_CHAR (SQL_C_CHAR workds fine).  At line 887 of convert.c (for (i = 0,
j =0; ptr[i]; i++)) I believe I found a bug dealing with the byte order of a
Mac.  The variable pre is point to the following data:

0xb015f0:       0x0000  0x0039  0x0000  0x0039  0x0000  0x0039  0x0000
0x0039

Basicaly "9999" in 2 byte unicode (Note that Macs are 4 byte unicode).
Since ptr is a const char* it never goes into the for statement to copy the
data.  This is the case for numeric fields in the database I can only assume
character fields have a similiar issue.  Has any one else seen this problem?

Joel Kiger


pgsql-odbc by date

Next:From: Dave PageDate: 2005-10-20 13:57:42
Subject: Re: MAC OSX copy_and_convert_field bug for SQL_W_CHAR
Previous:From: Merlin MoncureDate: 2005-10-20 12:06:05
Subject: Re: versions of oDBC driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group