On Wed, Jul 11, 2007 at 02:03:16PM -0600, Brian Cole wrote: > File > "/jeeves_home/knightly/knightly/lib/sqlobject/mysql/mysqlconnection.py", > line 113, in _executeRetry > query = unicode(query, self.encoding) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position > 1180: ordinal not in range(128) > > Should the converter take care of properly escaping the python string > to be included in the BLOB field?
The problem is not in a converter but in MySQLdb connection - newer MySQLdb requires queries to be unicode, and SQLObject has problems converting the query from ASCII charset to unicode. > Or should I be doing this and how > should I be doing this? I don't think there is a simple solution. IMHO the options are: 1) downgrade to non-unicode MySQLdb; 2) upgrade to non-MySQL backend; 3) create a validator/converter and attach it to all your BLOB columns; 3a) create an escaping BLOB column; 4) escape/unescape binary data yourself. Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss