MS SQL, Ubuntu, and UTF-8 problems

161 views
Skip to first unread message

wgw

unread,
Jun 25, 2012, 11:33:04 PM6/25/12
to pyo...@googlegroups.com
I am on Ubuntu 10.04 and trying to get data with international characters (éà etc...) from a remote ms sql server.

With tsql the data comes back with accents intact, so freetds is working properly.

With pyodbc (pyodbc-2.1.7-py2.6-linux-i686.egg), accented characters are scrambled.

With DataManager from unixODBC accented characters are scrambled too. (I read that unixODBC had to be compiled with --with-iconv-char-enc=UTF8 for accents to display properly. )

I am able to interact properly using pymssql, which does not use unixODBC.

Should I try to go up to pyodbc 2.3.1 in order to be able to set the encoding? Or is this a unixODBC issue?

Some discussion....


Michael Kleehammer

unread,
Jun 25, 2012, 11:35:21 PM6/25/12
to pyo...@googlegroups.com
If possible, try the Microsoft ODBC driver for Linux. It works very well.

wgwi...@gmail.com

unread,
Jun 26, 2012, 1:01:55 AM6/26/12
to pyo...@googlegroups.com
Thanks for the feedback: as far as I can tell, it doesn't work with Ubuntu. From the doc (http://www.microsoft.com/en-us/download/details.aspx?id=28160) :

Supported operating systems: linux

Either 64-bit Red Hat Enterprise Linux 5 or 64-bit Red Hat Enterprise Linux 6 with the following RPM packages installed from your distribution’s package repository:


Reply all
Reply to author
Forward
0 new messages