The new update script

As some of you might have noticed, I committed a revised update script the other day. The big change this time is that the update script contains code that runs through all the text in your database and encodes it into UTF-8.

I talked about this in my previous post about the UTF-8 migration. However, in that post I discussed taking a database dump, running iconv on it and then re-importing it. With the new update script, that won’t be necessary unless the current encoding is non-ISO-8859-1 and the PHP environment lacks iconv and mbstring support. I believe this scenario will be relatively uncommon, particularly since any PHP5 environment should have iconv right out of the box. For ISO-8859-1, there’s no need for iconv or mbstring since we can use PHP’s built-in utf8_encode() function.

It would be great if you guys could test the new script. I’ve run it on a couple of semi-large database dumps and it appears to work just fine, but there’s only so many test cases I can come up with on my own. Do remember to make a backup of anything you attempt to convert.