Mysql 4.1 is available in the new server from migration. The transition from 4.0 to 4.1 is quite transparent as long as I do not try to set the default encodings of the db/tables to UTF-8.

However, as the proper way is to set the encodings in mysql 4.1 correctly, I decided to do it sooner rather than later.

According to the document, if UTF-8 was saved in the mysql 4.0 db although the default encoding is not UTF-8, then:

However, you should avoid trying to convert directly from latin1 to the "real" character set. This may result in data loss. Instead, convert the column to a binary data type, and then from the binary type to a non-binary type with the desired character set. Conversion to and from binary involves no attempt at character value conversion and preserves your data intact.

As it turns out, wordpress 2.1-alpha actually just save the text as latin1 strings, so no need to convert the fields to BINARY first, setting charset to UTF-8 on those fields is sufficient.

An sql file is prepared for doing this. (Proceed at your own risk and always backup first)