[Zope3-Users] Problem connecting to MySQL
Andy Dustman
farcepest at gmail.com
Tue Sep 13 10:23:08 EDT 2005
On 9/11/05, Stephen Day <shday at yahoo.com> wrote:
> Hello,
>
> I'm trying to access a MySQL database through Zope3
> but I keep getting an error about encoding:
>
> "LookupError: unknown encoding: latin1_swedish_ci"
>
> I've tried changing the encoding of the database and
> the Zope connection object to utf8, among other
> things, but nothing seems to work.
>
> I'm using MySQL 4.1.14-nt, Zope-3.1.0c1 with
> mysqldbda-1.0.0 installed, and Python 2.4.1.
Some versions of MySQL-4.1 incorrectly return the collation name
rather than the encoding name. Note the "_ci" suffix; this is for
"case-insensitive", which means it's a collation.
http://bugs.mysql.com/bug.php?id=7891
However, this should be fixed in 4.1.9 or later. Is your client
library really 4.1.14? The mysql-python windows packages are supposed
to be built using 4.1.9, but I can't really verify this. To check, run
this in a Python interpreter:
>>> import MySQLdb
>>> print MySQLdb.get_client_info()
This will show what version of the client library is in use.
--
Computer interfaces should never be made of meat.
http://www.terrybisson.com/meat.html
More information about the Zope3-users
mailing list