[Zope-DB] ZMySQLDA and utf-8

Wolfram Kraus kraus at hagen-partner.de
Tue Mar 1 03:55:02 EST 2005


Python 2.3.4 - Zope 2.7.4 - MySQLdb 1.2.0 - ZMySQLDA 2.0.8 or 2.0.9b2

How do I set ZMySQLDA to permanently use utf-8 as client character set?
When I insert the line "self.db.query('set character set utf8')" in 
db.DB.__init__() everything works fine ("show variables like '%char%'" 
in the test-tab of ZMySQLDA) until I restart MySQL, which resets the 
client character set to latin-1. The only solution to set the character 
set permanently is to do this in _begin().
Is this recommended or is there another solution?


More information about the Zope-DB mailing list