Monday, January 31, 2011

pyodbc & FreeTDS: Can I work with NVARCHAR column on MSSQL2008

I have FreeTDS, pyodbc-2.1.8, python-2.6, ubuntu-10.4.
I also have MSSQL2008 database server on Windows7.

My question is: Can I get unicode data from nvarchar column on
Mssql2008 database using pyodbc?
To do this, what does other library or configuration need me?

I use FreeTDS driver to connect with mssql by pyodbc. But I don't know
version of FreeTDS.
How to know the version of FreeTDS?

My current state is, I can connect with mssql. But I can not get
unicode data!
My code is:
import pyodbc
conn =
crms = conn.cursor()
crms.execute("SELECT cc_Name FROM tblHR_CodeClass")
for line in crms:
print 'cc_Name:', str(line.cc_Name)
Expected result is 'cc_Name: Аймаг, хот', but instead
'cc_Name: ?????, ???' comes.

Please, share your experience!


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment