Hello everyone,

I've upgraded my web server from MySQL 4.1 to MySQL 5.0 (ubuntu breezy
-> dapper upgrade). After that, I've noticed some display problems with
accentuated characters in strings coming from the database. In order to
fix that, I've forced the character encoding to utf8 in my.cnf:

#Set the default character set.
default-character-set=utf8
#Set the default collation.
default-collation=utf8_general_ci

With this setting, the accentuated characters are correctly displayed.

But strangly, now all the varchar columns in the database have their
size divided by 3. If I switch back to latin1, I have correct lengths,
but characters are badly displayed again. I suppose this is related to
the utf8 conversion that has probably been performed by the upgrade
script. But now I'd like to keep the utf8 encoding and fix the size for
my varchar columns.

I'm not at all a MySQL expert and I haven't been able to find a similar
issue and its fix, so I'd like to ask you: how could I resize all the
varchar columns of a database using a script, or any other mean? Would
you have a suggestion or a pointer?

Thanks in advance,
Alex.