- attached 3091.patch
update description_encoding for pyodbc
Issue #3091
resolved
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:
#! 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]
Comments (11)
-
reporter -
reporter - attached 3091_0_8.patch
absolutely. 0.8 is improved by this as well.
-
reporter - changed milestone to 0.9.7
-
reporter - changed status to resolved
- In the SQL Server pyodbc dialect, repaired the implementation
for the
description_encoding
dialect parameter, which when not explicitly set was preventing cursor.description from being parsed correctly in the case of result sets that contained names in alternate encodings. This parameter shouldn't be needed going forward. fixes#3091
→ <<cset 0add251ea0be>>
-
reporter - In the SQL Server pyodbc dialect, repaired the implementation
for the
description_encoding
dialect parameter, which when not explicitly set was preventing cursor.description from being parsed correctly in the case of result sets that contained names in alternate encodings. This parameter shouldn't be needed going forward. fixes#3091
→ <<cset a1d9c81f5ac7>>
- In the SQL Server pyodbc dialect, repaired the implementation
for the
-
reporter - In the SQL Server pyodbc dialect, repaired the implementation
for the
description_encoding
dialect parameter, which when not explicitly set was preventing cursor.description from being parsed correctly in the case of result sets that contained names in alternate encodings. This parameter shouldn't be needed going forward. fixes#3091
Conflicts: test/sql/test_unicode.py
→ <<cset a81d3a23c005>>
- In the SQL Server pyodbc dialect, repaired the implementation
for the
-
reporter - Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
#3091as this fix is also in that issue's patch, but is a different issue.
→ <<cset 2825730e7be6>>
- Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
-
reporter - Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
#3091as this fix is also in that issue's patch, but is a different issue.
→ <<cset 1604b5c08917>>
- Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
-
reporter - Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
#3091as this fix is also in that issue's patch, but is a different issue.
→ <<cset 74d38623ff52>>
- Added statement encoding to the "SET IDENTITY_INSERT"
statements which operate when an explicit INSERT is being
interjected into an IDENTITY column, to support non-ascii table
identifiers on drivers such as pyodbc + unix + py2k that don't
support unicode statements.
ref
-
reporter - changed milestone to 0.9.8
-
reporter - changed milestone to 0.9.7
- Log in to comment
patch is attached. a couple of issues. with these fixes, SQL server can pass on test/sql/test_unicode on Py2K and freetds 0.91. py3k is not any better. but this is sort of good for 0.8 really, consider porting it there.