On Wed, May 16, 2007 at 08:46:33PM +0800, ro wrote: > hi all > > While I use sqlobject to commit UTF8 string to MySQL, this error caused > > File > "d:\python24\lib\site-packages\SQLObject-0.7.5-py2.4.egg\sqlobject\mysql\mysqlconnection.py", > line 77, in _executeRetry > myquery = unicode(query, self.encoding) > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position > 111: ordinal not in range(128) > > Is there any option could enable utf8?
Upgrade to 0.7.6 and set the encoding in DB URI: connection = connectionForURI("mysql://user:[EMAIL PROTECTED]/db?charset=utf8&sqlobject_encoding=utf-8") 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