I'm using mysqldb (1, 2, 1, 'final', 2) and those options to connect 

sqlobject_encoding=utf8&use_unicode=1&charset=utf8

so the self.need_encoding is set to True in MySQLConnection but when in
MySQLConnection._executeRetry :

  File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/sqlobject/mysql/mysqlconnection.py",
 line 73, in _executeRetry
    myquery = unicode(query, self.encoding)
TypeError: decoding Unicode is not supported

'query' is already a unicode string, so I've changed 

        if self.need_unicode: (line 74)

to  

        if self.need_unicode and self.encoding != 'utf8':

but it doesn't feel right, how can I fix that in a clean way ?

Loïc.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to