[Mono-bugs] [Bug 434772] unixODBC connection fails with I000 error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 4 12:28:58 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=434772

User jeffrey.w.williams at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=434772#c5


Jeff Williams <jeffrey.w.williams at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jeffrey.w.williams at gmail.co
                   |                            |m




--- Comment #5 from Jeff Williams <jeffrey.w.williams at gmail.com>  2009-09-04 10:28:55 MDT ---
I ran GDB on OpenSim w/ our Linux ODBC driver and found it was erroring out on
line 405 in OdbcConnection.cs. This in turn was traced back to the SQLConnect
DllImport in libodbc.cs. As Gert suspected, the only changes that occurred with
this DllImport (as well as all of the others for all ODBC functions) between
Mono 1.9.1 and Mono 2.x were the Unicode additions.

After I did some digging I had a hunch that one of the character sets wasn't
lining up now that Unicode was being used. I realized then that Mono, by
implementing Windows Unicode functions, uses UCS-2/UTF-16 and returns data in
that format. However the data being sent to/from these functions was malformed
because in our case Informix by default uses UCS-4 as its locale.

Thus the problem was fixed by merely changing /etc/unixODBC/odbc.ini (or
whichever INI you are using and setting the $ODBCINI param to it) to have the
following addition:

[ODBC]
UNICODE=UCS-2

To instruct Informix to send and receive data over its ODBC driver in UCS-2.

I'm not sure if all Linux ODBC drivers support UCS-2 as the default on most
Linux distros I believe is UTF-8. Although Gert said MySQL was working
correctly I am not sure what configuration he is using and haven't tested it. 

>From what I can tell, it would appear that Mono requires the ODBC driver to
support UCS-2 to work properly and to be configured as such.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list