in reply to Re: UTF8 to Mysql transformed by mysql.so?
in thread UTF8 to Mysql transformed by mysql.so?

Thanks but no. The above example demonstrates conformance to the Perl -> MySQL UTF-8 pattern described in that document does not work in this case. Something else is going on.
  • Comment on Re^2: UTF8 to Mysql transformed by mysql.so?

Replies are listed 'Best First'.
Re^3: UTF8 to Mysql transformed by mysql.so?
by Corion (Patriarch) on Jun 21, 2012 at 20:49 UTC

    You don't show the code you're using to read the data and write it to the DB. You also don't show the MySQL versions (client library, server version, DBD::mysql) involved. There is a bug report for DBD::mysql that includes code to replicate the problem. Maybe that bug is present in your environment as well?

      Its probably related to that bug somehow. One thing that appears to be happening is a gratuitous utf8::encode on the way through mysql.so so that if I have one database field that is riddled with wide-character representations, it shows up in the database ok but another database field that is already decoded, it mangles as though it performed a utf8::encode on a string that was already encoded. The string that is mangled does have utf8::is_utf8 == Test::utf8::is_flagged_utf8 == 1 and Test::utf8::is_sane_utf8 == 1;