in reply to Re: A UTF8 round trip with MySQL
in thread A UTF8 round trip with MySQL

decode_utf8 will fail when $data is already flagged as utf8 (i.e. when you're using mysql_enable_utf8 on a recent DBD::mysql version).

Also, as clinton noted, your code also requires you to keep track of which columns are binary and which are text.

Replies are listed 'Best First'.
Re^3: A UTF8 round trip with MySQL
by Burak (Chaplain) on Jun 28, 2007 at 21:26 UTC
    mysql_enable_utf8 is not an auto feature, so it has no effect unless enabled. If it is in effect and I also use Encode methods, this is like shooting yourself in the foot :)
Re^3: A UTF8 round trip with MySQL
by Anonymous Monk on Jul 30, 2013 at 13:30 UTC
    decode_utf8 will only fail if the input is invalid utf-8. whether the data is flagged as utf-8 or not does not matter.