DBD-ODBC-1.14 unicode bug?
DBD-ODBC-1.14 unicode bug?
am 26.11.2007 17:20:58 von jergendutch
Hello,
I am building DBD::ODBC without unicode support.
In dbdimp.c, I have:
case SQL_VARCHAR: return "VARCHAR";
case SQL_WCHAR: return "UNICODE CHAR";
#ifdef SQL_WVARCHAR
case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
SQLServer 7 ntext type 2/24/2000 */
#endif
Shouldn't SQL_WCHAR be included too? i.e.
case SQL_VARCHAR: return "VARCHAR";
#ifdef SQL_WVARCHAR
case SQL_WCHAR: return "UNICODE CHAR";
case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
SQLServer 7 ntext type 2/24/2000 */
#endif
I get the following error otherwise:
dbdimp.c: In function 'odbc_describe':
dbdimp.c:1780: error: 'SQL_WCHAR' undeclared (first use in this function)
dbdimp.c:1780: error: (Each undeclared identifier is reported only once
dbdimp.c:1780: error: for each function it appears in.)
dbdimp.c:1781: error: 'SQL_WVARCHAR' undeclared (first use in this function)
dbdimp.c:1782: error: 'SQL_C_WCHAR' undeclared (first use in this function)
dbdimp.c:1784: error: 'WCHAR' undeclared (first use in this function)
dbdimp.c: In function 'odbc_st_fetch':
dbdimp.c:2401: error: 'SQL_C_WCHAR' undeclared (first use in this function)
dbdimp.c:2402: error: 'SQL_WCHAR' undeclared (first use in this function)
dbdimp.c:2404: error: 'WCHAR' undeclared (first use in this function)
dbdimp.c:2404: error: 'p' undeclared (first use in this function)
dbdimp.c:2404: error: expected expression before ')' token
dbdimp.c:2409: error: expected expression before ')' token
dbdimp.c:2409: error: too few arguments to function 'sv_setwvn'
dbdimp.c: In function '_dbd_get_param_type':
dbdimp.c:2601: error: 'SQL_WCHAR' undeclared (first use in this function)
dbdimp.c:2602: error: 'SQL_WVARCHAR' undeclared (first use in this function)
dbdimp.c:2603: error: 'SQL_WLONGVARCHAR' undeclared (first use in this function)
dbdimp.c:2604: error: 'SQL_C_WCHAR' undeclared (first use in this function)
dbdimp.c: In function '_dbd_rebind_ph':
dbdimp.c:2657: error: 'WCHAR' undeclared (first use in this function)
dbdimp.c:2694: error: 'SQL_C_WCHAR' undeclared (first use in this function)
dbdimp.c:2887: error: expected expression before ')' token
make: *** [dbdimp.o] Error 1
To get it to compile, I made the above change, as well as commenting
out line 1585:
s_c(SQL_C_WCHAR);
Not the right approach, but it got me going.
Is this a bug, or have I done something monstrously wrong?
Thanks.
Re: DBD-ODBC-1.14 unicode bug?
am 26.11.2007 18:44:31 von Martin.Evans
Jergen Dutch wrote:
> Hello,
>
> I am building DBD::ODBC without unicode support.
>
> In dbdimp.c, I have:
>
> case SQL_VARCHAR: return "VARCHAR";
> case SQL_WCHAR: return "UNICODE CHAR";
> #ifdef SQL_WVARCHAR
> case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
> SQLServer 7 ntext type 2/24/2000 */
> #endif
>
> Shouldn't SQL_WCHAR be included too? i.e.
>
> case SQL_VARCHAR: return "VARCHAR";
> #ifdef SQL_WVARCHAR
> case SQL_WCHAR: return "UNICODE CHAR";
> case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
> SQLServer 7 ntext type 2/24/2000 */
> #endif
>
> I get the following error otherwise:
>
> dbdimp.c: In function 'odbc_describe':
> dbdimp.c:1780: error: 'SQL_WCHAR' undeclared (first use in this function)
> dbdimp.c:1780: error: (Each undeclared identifier is reported only once
> dbdimp.c:1780: error: for each function it appears in.)
> dbdimp.c:1781: error: 'SQL_WVARCHAR' undeclared (first use in this function)
> dbdimp.c:1782: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> dbdimp.c:1784: error: 'WCHAR' undeclared (first use in this function)
> dbdimp.c: In function 'odbc_st_fetch':
> dbdimp.c:2401: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> dbdimp.c:2402: error: 'SQL_WCHAR' undeclared (first use in this function)
> dbdimp.c:2404: error: 'WCHAR' undeclared (first use in this function)
> dbdimp.c:2404: error: 'p' undeclared (first use in this function)
> dbdimp.c:2404: error: expected expression before ')' token
> dbdimp.c:2409: error: expected expression before ')' token
> dbdimp.c:2409: error: too few arguments to function 'sv_setwvn'
> dbdimp.c: In function '_dbd_get_param_type':
> dbdimp.c:2601: error: 'SQL_WCHAR' undeclared (first use in this function)
> dbdimp.c:2602: error: 'SQL_WVARCHAR' undeclared (first use in this function)
> dbdimp.c:2603: error: 'SQL_WLONGVARCHAR' undeclared (first use in this function)
> dbdimp.c:2604: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> dbdimp.c: In function '_dbd_rebind_ph':
> dbdimp.c:2657: error: 'WCHAR' undeclared (first use in this function)
> dbdimp.c:2694: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> dbdimp.c:2887: error: expected expression before ')' token
> make: *** [dbdimp.o] Error 1
>
> To get it to compile, I made the above change, as well as commenting
> out line 1585:
> s_c(SQL_C_WCHAR);
> Not the right approach, but it got me going.
>
> Is this a bug, or have I done something monstrously wrong?
>
> Thanks.
>
>
Could you please tell me which ODBC driver manager or driver you were
building with and its version. i.e. What did you set -o (or ODBCHOME to)
and what driver/driver_manager is at that location? Some of this is
output during perl Makefile.PL stage.
Thanks.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
Re: DBD-ODBC-1.14 unicode bug?
am 27.11.2007 09:27:00 von jergendutch
On Nov 26, 2007 6:44 PM, Martin Evans wrote:
>
> Jergen Dutch wrote:
> > Hello,
> >
> > I am building DBD::ODBC without unicode support.
> >
> > In dbdimp.c, I have:
> >
> > case SQL_VARCHAR: return "VARCHAR";
> > case SQL_WCHAR: return "UNICODE CHAR";
> > #ifdef SQL_WVARCHAR
> > case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
> > SQLServer 7 ntext type 2/24/2000 */
> > #endif
> >
> > Shouldn't SQL_WCHAR be included too? i.e.
> >
> > case SQL_VARCHAR: return "VARCHAR";
> > #ifdef SQL_WVARCHAR
> > case SQL_WCHAR: return "UNICODE CHAR";
> > case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
> > SQLServer 7 ntext type 2/24/2000 */
> > #endif
> >
> > I get the following error otherwise:
> >
> > dbdimp.c: In function 'odbc_describe':
> > dbdimp.c:1780: error: 'SQL_WCHAR' undeclared (first use in this function)
> > dbdimp.c:1780: error: (Each undeclared identifier is reported only once
> > dbdimp.c:1780: error: for each function it appears in.)
> > dbdimp.c:1781: error: 'SQL_WVARCHAR' undeclared (first use in this function)
> > dbdimp.c:1782: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> > dbdimp.c:1784: error: 'WCHAR' undeclared (first use in this function)
> > dbdimp.c: In function 'odbc_st_fetch':
> > dbdimp.c:2401: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> > dbdimp.c:2402: error: 'SQL_WCHAR' undeclared (first use in this function)
> > dbdimp.c:2404: error: 'WCHAR' undeclared (first use in this function)
> > dbdimp.c:2404: error: 'p' undeclared (first use in this function)
> > dbdimp.c:2404: error: expected expression before ')' token
> > dbdimp.c:2409: error: expected expression before ')' token
> > dbdimp.c:2409: error: too few arguments to function 'sv_setwvn'
> > dbdimp.c: In function '_dbd_get_param_type':
> > dbdimp.c:2601: error: 'SQL_WCHAR' undeclared (first use in this function)
> > dbdimp.c:2602: error: 'SQL_WVARCHAR' undeclared (first use in this function)
> > dbdimp.c:2603: error: 'SQL_WLONGVARCHAR' undeclared (first use in this function)
> > dbdimp.c:2604: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> > dbdimp.c: In function '_dbd_rebind_ph':
> > dbdimp.c:2657: error: 'WCHAR' undeclared (first use in this function)
> > dbdimp.c:2694: error: 'SQL_C_WCHAR' undeclared (first use in this function)
> > dbdimp.c:2887: error: expected expression before ')' token
> > make: *** [dbdimp.o] Error 1
> >
> > To get it to compile, I made the above change, as well as commenting
> > out line 1585:
> > s_c(SQL_C_WCHAR);
> > Not the right approach, but it got me going.
> >
> > Is this a bug, or have I done something monstrously wrong?
> >
> > Thanks.
> >
> >
> Could you please tell me which ODBC driver manager or driver you were
> building with and its version. i.e. What did you set -o (or ODBCHOME to)
> and what driver/driver_manager is at that location? Some of this is
> output during perl Makefile.PL stage.
>
> Thanks.
>
> Martin
> --
> Martin J. Evans
> Easysoft Limited
> http://www.easysoft.com
>
Sure: intersystems cache.
I extracted dist/ODBC/ODBC-8206-lnxrhx86.tar.Z from
5.2.0MV.8206.0_lnxrhx86_su.tar.gz and used:
perl Makefile.PL -o /usr/cacheodbc/dev/odbc/redist/iodbc
Some of the tests from make test fail, I can post these if you want.
Re: DBD-ODBC-1.14 unicode bug?
am 27.11.2007 09:57:59 von Martin.Evans
Jergen Dutch wrote:
> On Nov 26, 2007 6:44 PM, Martin Evans wrote:
>> Jergen Dutch wrote:
>>> Hello,
>>>
>>> I am building DBD::ODBC without unicode support.
>>>
>>> In dbdimp.c, I have:
>>>
>>> case SQL_VARCHAR: return "VARCHAR";
>>> case SQL_WCHAR: return "UNICODE CHAR";
>>> #ifdef SQL_WVARCHAR
>>> case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
>>> SQLServer 7 ntext type 2/24/2000 */
>>> #endif
>>>
>>> Shouldn't SQL_WCHAR be included too? i.e.
>>>
>>> case SQL_VARCHAR: return "VARCHAR";
>>> #ifdef SQL_WVARCHAR
>>> case SQL_WCHAR: return "UNICODE CHAR";
>>> case SQL_WVARCHAR: return "UNICODE VARCHAR"; /* added for
>>> SQLServer 7 ntext type 2/24/2000 */
>>> #endif
>>>
>>> I get the following error otherwise:
>>>
>>> dbdimp.c: In function 'odbc_describe':
>>> dbdimp.c:1780: error: 'SQL_WCHAR' undeclared (first use in this function)
>>>
>>> To get it to compile, I made the above change, as well as commenting
>>> out line 1585:
>>> s_c(SQL_C_WCHAR);
>>> Not the right approach, but it got me going.
>>>
>>> Is this a bug, or have I done something monstrously wrong?
>>>
>>> Thanks.
>>>
>>>
>> Could you please tell me which ODBC driver manager or driver you were
>> building with and its version. i.e. What did you set -o (or ODBCHOME to)
>> and what driver/driver_manager is at that location? Some of this is
>> output during perl Makefile.PL stage.
>>
>> Thanks.
>>
>> Martin
>> --
>> Martin J. Evans
>> Easysoft Limited
>> http://www.easysoft.com
>>
>
> Sure: intersystems cache.
>
> I extracted dist/ODBC/ODBC-8206-lnxrhx86.tar.Z from
> 5.2.0MV.8206.0_lnxrhx86_su.tar.gz and used:
> perl Makefile.PL -o /usr/cacheodbc/dev/odbc/redist/iodbc
>
> Some of the tests from make test fail, I can post these if you want.
>
>
Thanks.
I have changed dbdimp.c to to test for SQL_WCHAR before using it. It
looks like you are using iODBC which should define SQL_WCHAR but perhaps
cache distributes with an old one.
I would be interested in the errors you see. Could you run the test with
TEST_VERBOSE set and send me the errors (no need to send them to this
list as if I find anything I'll post it back here).
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com