On 1/23/07, Adrian Howard <[EMAIL PROTECTED]> wrote: > On 23 Jan 2007, at 16:00, David Naughton wrote: > [snip] >> The docs say that mysql_enable_utf8 is an "object method", and you're >> calling it as a class method. > > D'oh! I missed the subheading. Obviously need more coffee :) > >> In order to enable utf8 for all >> connections, try this: >> >> __PACKAGE__->default_connect_options( mysql_enable_utf8 => 1 ); > > Soooper. Ta.
Is mysql_enable_utf8 a connect option? I thought it was just a $dbh attribute. Connect options end up going in the "..." part here: DBI->connect(<dsn>, <username>, <password>, { ... }); The default_connect_options() class method and connect_options() object method are used to set that stuff. $dbh attributes, OTOH, get set on the $dbh itself: $dbh = DBI->connect(...); $dbh->{'mysql_enable_utf8'} = 1; The mysql_enable_utf8() object method controls that, as set either directly on the Rose::DB object: $db->mysql_enable_utf8(1); or indirectly in the registry entry: __PACKAGE__->register_db( driver => 'mysql', database => 'test', host => 'localhost', username => 'me', password => 'mysecret', mysql_enable_utf8 => 1, ); -John ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object