Well, between a quirk in the configure arguments allowed for MySQL 4.1.7 and a bad assumption made in MT 3.1, I found the place the bug in Unicode translation was creeping in. I even came up with a workaround, but it causes a cardinal sin for me: it requires modification of MT source code, something I absolutely loathe doing.
I'll be posting that to the MT dev list soon to ask if anyone else has had to do this. (Plenty of people using PHP5 have had to do this; I just didn't find any record of other MT3 users needing this hack.)
Oh, the trick itself? Just after the DBD::mysql handle is built in lib/MT/ObjectDriver/DBI/mysql.pm, you have to force a SET NAMES 'utf8' down the line. And, no, you can't override it anywhere in my.cnf; I tried seven ways to Sunday, and it just doesn't work.
If you're interested in the change in patch format, check out the extended part below.
Mad props go to Sergei Golubchik from MySQL AB (from this article) and Angie Ahl for her post last week to Web Server Talk.
--- mysql.pm 2004-12-07 22:09:31.514100000 -0600
+++ mysql.pm.orig 2004-04-28 21:43:03.000000000 -0500
@@ -50,8 +50,6 @@
{ RaiseError => 0, PrintError => 0 })
or return $driver->error(MT->translate("Connection error: [_1]",
$DBI::errstr));
- my $utf8set = qq{SET NAMES 'utf8';};
- $driver->{dbh}->do($utf8set);
$driver;
}
