FAQ
For reasons I'm not clear on our MySQL / DBIC / Catalyst set-up has
lately started dropping utf8-ness. I had a dig around and there seem
to be a few solutions.

Matt's talk http://www.shadowcat.co.uk/catalyst/-talks/oscon/crucible.xul
suggests, slide 92 (which sadly I can't copy/paste) using an
on_connect_do. It doesn't say where exactly this goes but I'm assuming
in the schema base class? It didn't help in any case :-)

I read in http://dev.mysql.com/doc/refman/5.0/en/charset-general.html
a way of setting character set results, so tried this,

__PACKAGE__->config(
schema_class => 'IDL::Schema',
connect_info => [@IDL::Schema::connect_info],
on_connect_do => [
#'set names utf8',
'SET character_set_results="utf8"',
],
);

That didn't appear to do anything either.

What /did/ work was, __PACKAGE__->load_components(qw/UTF8Columns/);
and then individually setting uft8_columns(qw/name etc/);

Any ideas why the first two didn't work? I'm not really excited about
setting UTF8 on every text column...

**

Stabbing at it from the database side, the db is latin1,

mysql> show variables like "character_set_database";
+------------------------+--------+
Variable_name | Value |
+------------------------+--------+
character_set_database | latin1 |
+------------------------+--------+

Attempting alter database default character set 'utf8'; alter database
character set 'utf8'; seems too easy and doesn't appear to help
either.

Maybe it needs to be reloading from scratch as utf8 or something?

P

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
groupdbix-class @
categoriesperl, catalyst
postedDec 10, '08 at 12:03a
activeDec 10, '08 at 12:41a
posts2
users2
websitedbix-class.org
irc#dbix-class

2 users in discussion

Ash Berlin: 1 post Paul Makepeace: 1 post

People

Translate

site design / logo © 2022 Grokbase