Solving it on the database side would be the optimal solution. If it isn't a possibility, for whatever reason, take a look at http://perldoc.perl.org/utf8.html. Thanks, James On 5/10/07, Christian Kuelker <christian.kuelker@cipworx.org> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > Oliver König schrieb: > > Sarge > > ==== > > mysql 4.0.24 > > > > Etch > > ==== > > mysql 5.0.32 > > > > In mysql everything looks fine, too: > I doubt .. > > > mysql> SHOW VARIABLES LIKE "character_set_%"; > > +--------------------------+----------------------------+ > > | Variable_name | Value | > > +--------------------------+----------------------------+ > > | character_set_client | utf8 | > > | character_set_connection | utf8 | > > | character_set_database | utf8 | > > | character_set_filesystem | binary | > > | character_set_results | utf8 | > > | character_set_server | utf8 | > > | character_set_system | utf8 | > > | character_sets_dir | /usr/share/mysql/charsets/ | > > +--------------------------+----------------------------+ > > > > However a PERL script with dbh->do(SHOW VARIABLES LIKE "character_set_%"); > > returns: > > character_set_client latin1 > > character_set_connection latin1 > > character_set_database utf8 > > character_set_filesystem binary > > character_set_results latin1 > > character_set_server utf8 > > character_set_system utf8 > > character_sets_dir /usr/share/mysql/charsets/ > > > > How can we tell PERL to use UTF-8 as default encoding? > > As you show in your query, the results are in latin1. I would guess > it is the upgrade of mysql which is your problem. So try to solve the > problem in mysql not Perl. > > Cheers > C. > > > > > > > > > > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGQvO3rKb2iXSP9HYRAtdhAKCnJHGJRe/+SbvVUyDJVBNegXg6rQCfTfn2 > opttpYX19epCeWfJMsGf0ZY= > =LB2m > -----END PGP SIGNATURE----- >