Next question about russian encoding, mssql and python.
I have this simple code:
import pymssql
import codecs
conn=pymssql.connect(host='localhost:1433', user='sa', password='password', database='TvPgms')
cur = conn.cursor()
cur.execute('SELECT TOP 5 CAST( Name AS nvarchar(400) ), CONVERT(nvarchar(400), idProgram) FROM dbo.Programs')
p=cur.fetchone()
h=p[0]
d=codecs.lookup(h)
print h
conn.close()
I get the error: LookUp Error : Unnown Encoding: ????? ?????? ???????
I cant reed russian varchar filds from MSSQL. But when i just print string in the same code all is ok, it print me normal russian characters. Who know how?
If I truing just print h insted of codecs.lookup than i get no error, but it prints me ???????? ?????????