[development] multisite shared table upgrade enhancements (was what would be more useful)

Steven Wittens steven at acko.net
Tue Feb 28 13:42:23 UTC 2006


> Altering the table and columns does not reliably prevent
> foreign characters from being irretrievably mangled.
>
> If we change tables like this, we also need to change their
> contents.
>
No we don't. I follow the exact recommendations from the MySQL 
documentation. In the original issue http://drupal.org/node/51110 this 
is explained. Drupal has been sending UTF-8 data, but MySQL did not know 
this. So it interpreted the data as another character set (e.g. 
Latin-1). This meant that character counts and boundaries were off and 
that case conversion did not work.

The fix is to force mysql to only re-interpret the data, and not change 
it. The underlying bytes remain the same, but MySQL now knows where to 
place character boundaries and how to do case conversion the right way.

http://dev.mysql.com/doc/refman/4.1/en/charset-conversion.html

If your data is corrupted by the update, then it was not in UTF-8 to 
begin with.

Steven Wittens





More information about the development mailing list