mkleehammer/pyodbc — Issue #8: execute unicode str without parameters
Author: mdobrzanski
Created: 2011-11-22 13:34:35+00:00
State: open

When using unicode query string, query doesn't execute.

```
import pyodbc
con = pyodbc.connect('DSN=Northwind; UID=vte; PWD=vte')
res = con.cursor().execute(u"select * from Customers where CustomerID = 'ĄŁÓ$!'").fetchall()
print len(res)
#output: 0, should be 1
```

When encoding query string utf-8 the result is the same - 0

My configuration on Ubuntu 10.04

**FreeTDS 0.91** freetds.conf

```
[global]
# TDS protocol version
tds version = 8.0
client charset = UTF-8
text size = 64512

[mssql]
host = hostname.somedomain
port = 1433
tds version = 8.0
```

**unixODBC 2.3.0** odbcinst.ini

```
[FreeTDS]
Driver = /usr/local/lib/libtdsodbc.so

[SQLServer]
Driver = /usr/local/lib/libtdsodbc.so
```
obdc.ini

```
[Northwind]
Description	= MS SQL Database
Driver	= FreeTDS
Servername	= mssql
Database	= Northwind
UID	=
PWD	=
Port	= 1433
````

**pyodbc-3.0.2_beta01-py2.6**

Select works fine when using
isql

```
isql Northwind vte vte
select * from Customers where CustomerID = 'ĄŁÓ$!'
```

or tsql

```
tsql -S mssql -U vte -P vte
use Northwind
go
select * from Customers where CustomerID = 'ĄŁÓ$!'
go

```