Ian Wilson wrote:
> Yeah none of that seemed to work.   Any more ideas?

I'm afraid we ran out of the decent ideas. Personally, I use the
following dburi and the patch included below to make it all work. IIRC
SQLObject developers even merged this patch into codebase but only in a
dev branch, not the stable version TG uses (and requires)

sqlobject.dburi="mysql://...?client_encoding=utf8"

Index: sqlobject/mysql/mysqlconnection.py
===================================================================
--- sqlobject/mysql/mysqlconnection.py  (revision 1744)
+++ sqlobject/mysql/mysqlconnection.py  (working copy)
@@ -19,6 +19,10 @@
         self.user = user
         self.password = passwd
         self.kw = {}
+        if kw.has_key('client_encoding'):
+            self.client_encoding = col.popKey(kw, 'client_encoding')
+        else:
+            self.client_encoding = None
         for key in ("unix_socket", "init_command",
                 "read_default_file", "read_default_group"):
             if key in kw:
@@ -47,6 +51,8 @@

         if hasattr(conn, 'autocommit'):
             conn.autocommit(bool(self.autoCommit))
+        if self.client_encoding:
+            conn.query('SET NAMES ' + self.client_encoding)

         return conn


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to