I'm using django-pyodbc as database backend on Ubuntu 12.04 LTS and MSSQL 2008 on remote host. It works good except of returning Cyrillic symbols. Instead of them I see question marks - '?'. I have begin investigation what could cause this problem.
As far as I understand MSSQL-django chain looks so:
MSSQL <-> FreeTDS <-> unixODBC <-> pyodbc <-> django-pyodbc
So I have started from FreeTDS. When I run query in tsql - it works good I can see all symbols including Cyrillic.
The next one was isql - as far as I understand there I can test FreeTDS <-> unixODBC pair. And there I didn't get proper data. In fact when I run query in isql columns that contain Cyrillic symbols are empty or consist of not visible symbols. I guess that problem in communication between FreeTDS <-> unixODBC. What could cause this problem? Btw, I have also tried iusql - nothing have changed.
MSSQL collation is Cyrillic_General_CI_AS.
Content of freetds.conf:
[global]
tds version = 4.2
dump file = /tmp/freetds.log
debug flags = 0xffff
timeout = 10
connect timeout = 10
client charset = UTF-8
text size = 64512
[egServer50]
host = symachine.domain.com
port = 5000
tds version = 5.0
[egServer70]
host = ntmachine.domain.com
port = 1433
tds version = 7.0
[rfxdigest]
host = mssql-iis-1
port = 1433
tds version = 8.0
client charset = UTF-8
Content of odbc.ini:
[RFX]
Description = Rfx digest server
Driver = FreeTDS
Database = RFXDB
Servername = rfxdigest
TDS_Version = 8.0
Edit1 15.08.12
In python using pyodbc I get '?' instead of Cyrillic symbols - I have tried both python versions: UCS2 and UCS4.