Hi all,
I'm having problems with BLOBCol on MySQLdb 1.2.1+. I use UTF-8
as the charset for connection, and consequently I cannot save binary
data to the BLOB column. I tracked this down to
sqlobject/mysql/mysqlconnection.py,
line 78:
# For MysqlDB 1.2.1 and later, we go
# encoding->unicode->charset (in the mysql db)
myquery = unicode(query, self.encoding)
return cursor.execute(myquery)
However, the query (the generated SQL query) contain's binary data, so
unicode
function fails.
It seems that this conversion to unicode should be done while still building
the query, i.e. convert only string column values, not blobs or column
names.
While I could possibly dig into this and fix it, I wonder maybe anyone else
has
solution for this?
Cheers,
Adomas
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss