The Tsonny Blog

Browse blog archive by month

Quick and dirty MySQL 4 -> 5 and latin1 to utf8 conversion April 26, 2008

I spent most of this Sunday trying to migrate a MySQL 4.x databse to MySQL 5.x. What is easy in theory was impossible in practice: Using the standard mysqldump and import way always produced wrong character encodings in my DB. In fact, the old DB was in latin1, and I wanted the new (5.x) also to be in latin1. But importing the data always produced encodings in utf8 (although MySQL thought it was having latin1). So, I tried almost all but nothing worked but this trick:

  1. Dump the table definition and import into the new DB. You only need the tables, not the data!
  2. Convert all tables in the new DB to utf8 as default character encoding: alter ...

Alchemist's Handbook for Plone April 7, 2008

These are just some quick and dirty installation instructions for collective.tin, collective.lead, collective.mercury etc. What I really want to do is to use SQL content types within Plone 3.0 in a Zope3-ish way.

Unfortunately, I could not find information on how to install the collective.* packages, so here's my hack:

  1. Install SQLAlchemy 0.4.x. Straightforward, since it's an egg. Just remember to use the same python that is used to run Zope/Plone. If you're on a Mac, for example, set the $PATH variable so it finds your Plone package's python executable first (on OSX, Plone3, that is: /Applications/Plone-3.x/Python-2.4.x/python2.4)
    The package is then installed in Python-2.4.x/lib/site-packages of your Plone directory.
  2. Start with the SVN version of collective.lead. It's a ...