[Sqlalchemy-tickets] Issue #3091: update description_encoding for pyodbc (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-06-20 16:16:11
|
New issue 3091: update description_encoding for pyodbc https://bitbucket.org/zzzeek/sqlalchemy/issue/3091/update-description_encoding-for-pyodbc Mike Bayer: it seems like our defaults on this are out of date, examine pyodbc behavior re: cursor.description and see if we can either change the default, or put in a detection for it, possibly for 1.0 since this may be destabilizing: ``` #!python #! coding: utf-8 from sqlalchemy import * engine = create_engine("mssql+pyodbc://scott:tiger@ms_2008", echo=True, description_encoding='utf8') colname = u'Заказ.Номер заказа' m = MetaData() t = Table(u"Заказы", m, Column(colname, String(30), key='somecol')) m.drop_all(engine) m.create_all(engine) engine.execute(t.insert().values(somecol='some value')) result = engine.execute(t.select().where(t.c.somecol == 'some value')) row = result.fetchone() print row[t.c.somecol] ``` |