X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D7098D904F for ; Thu, 20 Oct 2005 10:46:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88451-10 for ; Thu, 20 Oct 2005 13:46:35 +0000 (GMT) Received: from Stargazer.Mercial.MercialXpress.net (cimcor.com [65.112.78.226]) by svr1.postgresql.org (Postfix) with ESMTP id 0A19CDA893 for ; Thu, 20 Oct 2005 10:46:36 -0300 (ADT) Received: from [192.168.1.50] by Stargazer.Cimcor.com (NTMail 6.00.0014/KW8578.00.9c30e071) with ESMTP id oarmbaaa for pgsql-odbc@postgresql.org; Thu, 20 Oct 2005 08:46:34 -0500 From: "Joel Kiger" To: Subject: MAC OSX copy_and_convert_field bug for SQL_W_CHAR Date: Thu, 20 Oct 2005 08:46:38 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/98 X-Sequence-Number: 6200 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