On Tue, Nov 27, 2007 at 02:02:02PM +0100, Markus Gritsch wrote:
> How about applying the attached patch?
--- mysqlconnection_orig.py 2007-09-27 02:18:28.000000000 +0200
+++ mysqlconnection.py 2007-11-27 13:57:30.324125000 +0100
@@ -110,10 +110,7 @@
# For MySQLdb 1.2.1 and later, we go
# encoding->unicode->charset (in the mysql db)
if self.need_unicode and not isinstance(query, unicode):
- try:
- query = unicode(query, self.encoding)
- except UnicodeError:
- pass
+ query = unicode(query, self.encoding)
return cursor.execute(query)
except MySQLdb.OperationalError, e:
if e.args[0] in (MySQLdb.constants.CR.SERVER_GONE_ERROR,
MySQLdb.constants.CR.SERVER_LOST):
I remember people had been persuading me to add that try/except for years,
and now you are starting the reverse process! :)
I am afraid something is deeply broken in SQLObject regarding
MySQL+unicode. Wonder what and how to fix that really.
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss