[unixODBC-dev] UNICODE and unixODBC

Igor Korot ikorot at earthlink.net
Mon Sep 5 07:47:23 BST 2005


Igor Korot wrote:

>I want to use UNICODE, so I wont have a problem with the international characters,
but I want to access the database at the same time.
>>Do you think it would be possible with the --enable-unicode being "of"?
>>  
>>
>Ok, but you will only get international chars from the database if it 
>supports UNICODE.
You mean the DB support UNICODE or the driver for that DB will convert it? Just to make sure: if I have a German umlaut in the DB, and the wxGTK is compiled without UNICODE support, but the driver will support UNICODE, what I will receive? Will I get the umlaut, or the ASCII symbols for the umlaut codes? Or it will depend on the driver UNICODE support?

>>Also, if I put the line
>>
>>#define SQLTCHAR wchar_t
>>
>>do you think it will solve the compilation errors?
>>
>>  
>>
>I doubt it. I would ask the wx folk, its not something under the control 
>of unixODBC. You could try changing the definition of SQLTCHAR in 
>sqltypes to match the above, that may work.
You mean in the file sqltypes.h put something like

#define SQLTCHAR wchar_t

? But then the problem would be: is it safe from the unixODBC point of view? Am I gonna break anything there? I mean the latest unixODBC is prety stable, so just to make sure I won't break anything by doing this...

Thank you for your replies.


-- 
Nick



-----Original Message-----
From: Igor Korot <ikorot at earthlink.net>
Sent: Sep 4, 2005 9:25 PM
To: Igor Korot <ikorot at earthlink.net>, Nick Gorham <nick.gorham at easysoft.com>, 
	Development issues and topics for unixODBC <unixodbc-dev at easysoft.com>
Subject: Re: [unixODBC-dev] UNICODE and unixODBC

I want to use UNICODE, so I wont have a problem with the international characters, but I want to access the database at the same time.
Do you think it would be possible with the --enable-unicode being "of"?

Also, if I put the line

#define SQLTCHAR wchar_t

do you think it will solve the compilation errors?

Thank you.

From: Nick Gorham <nick.gorham at easysoft.com>

>Maybe, I don't know, You may avoid itwithiODBC if it ignores  unicode, 
>it did in older versions but Ithink ithas support now.
>
>SQLTCHARis a ODBC type, on windows  if UNICODE is defined it becomes a 
>SQLWCHAR (short), and if its not defined a SQLCHAR (unsigned char), the 
>idea is that you can write code that works for UNICODE or not. If 
>UNICODE is defined all the ODBCAPI calls are defined as their W versions.
>
>What I think wxGTK is doing is using SQLTCHAR, but expecting it to be 
>the same type as they are using for their unicode storage,I would guess 
>this is  a short on windows, but fails on unix as it resolves to 32bit.
>
>I would have said what wx should do is convert from ODBC unicode to 
>their representation if needed.
>
>You CAN build unixODBC with 32bit unicode, you rebuild with 
>SQL_WCHART_CONVERT defined. But you then need a driver that supports 
>32bit chars, You will get away with it if you are just using a ansi 
>driver, as the driver manager will do the conversion.
>
>I guess it depends on what driver you are using, and why you want to use 
>unicode.

--
Nick



-----Original Message-----
From: Igor Korot <ikorot at earthlink.net>
Sent: Sep 4, 2005 12:48 PM
To: Nick Gorham <nick.gorham at easysoft.com>, 
	Development issues and topics for unixODBC <unixodbc-dev at easysoft.com>
Subject: Re: [unixODBC-dev] UNICODE and unixODBC

>>So, do you think that if I install iODBC, than everything will be solved,and I won't have those errors?
>>Also, if you try to install those packets together you would get these errors... I just don't get it. They are not >>using those types, yet the error messages  report inconsistent types with SQLTCHAR. Could you clarify? Does >>that mean that SQLTCHAR is used by unixODBC? In this case the simple #define should take care of this >>issue...

>>Thank you.

>I don't think the wx folk have got unicode and ODBC working together, 
>outside windows the unicode includes are commented out, partly because I 
>think they seem to like using iODBC. And Iam guessing they are using 
>wchar_t for their representation of unicode not SQLWCHAR, or SQLTCHAR.


-----Original Message-----
From: Igor Korot <ikorot at earthlink.net>
Sent: Sep 4, 2005 1:04 PM
To: Nick Gorham <nick.gorham at easysoft.com>, 
	Development issues and topics for unixODBC <unixodbc-dev at easysoft.com>
Subject: Re: [unixODBC-dev] UNICODE and unixODBC

>>This is the ./configure output attached.
>>
>>  
>>
>Ok, I guess thats a copy of unixODBC building.
Yes, that is correct

>Do I need to start with gentoo to reproduce this?

>Where does the error come in?

After you install unixODBC try to install wxGTK-2.6.1. It will give you those erors. In the GTK configure you need to set --with-odbc and --enable-unicode.
Since I'm not very familiar with the UNIX/Linux the easiest way is to give me an advice of how to fix those errors on the wxGTK side...
Or maybe just to make sure, you could try and reproduxce the errors, and then check if it's something on the unixODBC side that is broken...

Thank you.





More information about the unixODBC-dev mailing list