[gnue] r9894 - trunk/gnue-common/src/datasources/drivers/sql/mysql

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: johannes
Date: 2008-09-08 03:40:05 -0500 (Mon, 08 Sep 2008)
New Revision: 9894

Modified:
   trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py
Log:
Use proper encoding for both directions


Modified: trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py
===================================================================
--- trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py	2008-08-19 14:57:50 UTC (rev 9893)
+++ trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py	2008-09-08 08:40:05 UTC (rev 9894)
@@ -145,8 +145,10 @@
           kwargs [dbName] = connectData [gnueName]
 
     if int(srv_version) == 5 and mySQL_encTable.has_key (self._encoding):
-        kwargs ['init_command'] = ('SET NAMES %s' %
-                mySQL_encTable[self._encoding])
+        my_enc = mySQL_encTable[self._encoding]
+        kwargs ['charset'] = my_enc
+        kwargs ['init_command'] = ('SET NAMES %s' % my_enc)
+
     else:
       assert gDebug (1, "Encoding '%s' is not supported by mysql dbdriver. "
                  "Using default encoding." % self._encoding)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.