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

Reply via email to