github mkleehammer/pyodbc 4.0.7
Update for Teradata

latest releases: 5.1.0, 5.0.1, 5.0.0...
7 years ago

Recently a change was made to use SQLDescribeColW so that Unicode column names could be retrieved properly. Unfortunately this uncovered some weirdness with some drivers, this time Teradata.

I'm not sure if the issue is iODBC (which Apple doesn't ship anymore) is using a 4-byte
SQLWCHAR or if Teradata is returning UCS4/UTF-32LE for column names in SQLDescribeColW. Either
way I've added a hack that assumes 4-byte chars if the decoding for SQL_WMETADATA (a pyodbc
specific constant) is set to any of the UTF-32 encodings. The encoding is then actually used.

cnxn.setdecoding(pyodbc.SQL_WMETADATA, encoding='utf-32le')

Fixes #194

Don't miss a new pyodbc release

NewReleases is sending notifications on new releases.