Open GoogleCodeExporter opened 9 years ago
I Fix it changing te line 338 of the ???/sql_server/pyodbc/base.py file.
replacing
utf-8 for latin-1
Original comment by derlokep...@gmail.com
on 22 Apr 2010 at 11:38
Same thing worked for me, line 344. Could we make this a database option?
Thanks,
Collin
Original comment by CollinMA...@gmail.com
on 24 Jun 2011 at 9:03
I Fix using a workaround in my view.
...
conn = connections['MY_CONNECTION']
conn.driver_needs_utf8 = False
cursor = conn.cursor()
cursor.execute("SELECT * FROM some_table")
for row in cursor.fetchall():
print(row)
...
Original comment by ramiro...@gmail.com
on 15 Sep 2011 at 6:04
See attached a patch to check 'uses_utf8' in your database's OPTIONS, if set to
False pyodbc won't attempt to encode the results. Saves you from having to set
driver_needs_utf8 on the fly.
YMMV but it works nicely for me.
Original comment by alexdela...@gmail.com
on 9 Mar 2012 at 11:05
Attachments:
Original issue reported on code.google.com by
derlokep...@gmail.com
on 17 Apr 2010 at 4:17