Re: [Zope3-dev] mysqldbda mysql 4.1 problem
On 7/25/05, Dmitry Vasiliev [EMAIL PROTECTED] wrote: Andy Dustman wrote: On 7/24/05, Jaroslaw Zabiello [EMAIL PROTECTED] wrote: I have mysql 4.1 with database and all tables set to utf8. I have problems with Zope3.1beta/win32. I cannot query the database with mysqldbda adapter because I get an error: unknown encoding: latin1_swedish_ci. http://bugs.mysql.com/bug.php?id=7891 MySQL-4.1, prior to 4.1.9 (and 5.0.3), returns the collation instead of the character set; that's what you're seeing here. What client version are you running? I assume you have at least MySQL-python-1.2.0; older versions probably won't work with MySQL-4.1 (some 1.1 versions will, but 1.0 will not). I've just added the encoding attribute to the ZopeDatabaseAdapter (rev. 37378). Also I've changed psycopg adapter to respect the attribute. Can someone change mysqldbda to use self.getEncoding() instead of connection.character_set_name()? Note that connection.character_set_name() only retrieves the character set name that is in use. To actually set the character set name, you have to do a bit of SQL; for details see: http://dev.mysql.com/doc/mysql/en/charset-connection.html Also note that this is only applicable to MySQL-4.1 and newer. In 4.0, the character set is a server configuration option and cannot be changed by the client. -- Computer interfaces should never be made of meat. http://www.terrybisson.com/meat.html ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] mysqldbda mysql 4.1 problem
On 7/24/05, Jaroslaw Zabiello [EMAIL PROTECTED] wrote: I have mysql 4.1 with database and all tables set to utf8. I have problems with Zope3.1beta/win32. I cannot query the database with mysqldbda adapter because I get an error: unknown encoding: latin1_swedish_ci. http://bugs.mysql.com/bug.php?id=7891 MySQL-4.1, prior to 4.1.9 (and 5.0.3), returns the collation instead of the character set; that's what you're seeing here. What client version are you running? I assume you have at least MySQL-python-1.2.0; older versions probably won't work with MySQL-4.1 (some 1.1 versions will, but 1.0 will not). -- Computer interfaces should never be made of meat. http://www.terrybisson.com/meat.html ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Suspected bug in package mysqldbda-1.0.0.tgz for Zope 3
On 4/16/05, hoon kim [EMAIL PROTECTED] wrote: Hi all, I'm a newbie and just installed the zope3 package on windows. I'm writing because i believe there is a bug in the mysqlda adaptor add-in package. My configuration is as follows: * OS = Windows XP Professional SP2 * Python Version = Python-2.3.5.exe * Zope Version = ZopeX3-3.0.0.win32-py2.3.exe * MySQL-Python adaptor = MySQL-python.exe-1.0.0.win32-my4.1-py2.3.exe * Zope MySQL Package = mysqldbda-1.0.0.tgz * MySQL Version = mysql-4.1.10-win32.zip I advise against using MySQL-python-1.0.0; use 1.2.0 instead. I followed the installation instructions but when i tried to test the db connection through the web interface of zope 3, the following error was returned: unknown encoding: latin1_swedish_ci There are probably two issues here. One is that MySQL's API function that returns the character set actually returns the collation. I've previously reported this as a bug, but it may be intentional; I need to check the status of this. The other is that the default character set for the MySQL server is latin1_swedish (with latin1_swedish_ci collation). I expect that this is probably not what you want. If you have administrative control over the server, configure it to use the character set you want; I recommend utf8. -- Computer interfaces should never be made of meat. http://www.terrybisson.com/meat.html ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com