[Catalyst] UTF-8 strings getting stragely converted to latin1 when coming from MySQL DB
Daniel McBrearty
danielmcbrearty at gmail.com
Fri Mar 3 16:12:51 CET 2006
I suggested the "set names utf8" thing. That's because I have personal
experience of mysql doing just what the OP described, and this turned out to
be the fix.
I have no idea if or how catalyst makes this call ... but I just know that
SOMETHING has to ...
On 3/3/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>
> On Fri, Mar 03, 2006 at 10:14:54AM +0000, Paul Makepeace wrote:
> > Je 2006-03-03 10:10:49 +0000, Michele Beltrame skribis:
> > > Hello Matt!
> > >
> > > > __PACKAGE__->storage->on_connect_do([ "set names utf8" ]);
> > > >
> > > > to ensure this gets run immediately after the $dbh is
> (re-)connected.
> > >
> > > At last I was able to migrate one of my Catalyst application to
> > > DBIC::Schema. However, putting this query in the schema class does no
> > > good for the UTF-8 thing.
> >
> > As an anecdotal datapoint, I didn't find this to be of use; it seemed to
> > garble the output. At the same time, I didn't look too hard at it.
>
> I know on_connect_do works. I didn't suggest the 'set names utf8' bit this
> time round and I'm not familiar with the problem myself.
>
> > Matt - did you suggest this off the back of my experimentation on IRC
> > or have you actually had it work?
>
> Somebody else suggested it; I'm more hopeful about the UTF8Columns
> component
> that Daisuke (typester) is working on.
>
> --
> Matt S Trout Offering custom development, consultancy and
> support
> Technical Director contracts for Catalyst, DBIx::Class and BAST.
> Contact
> Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more
> information
>
> + Help us build a better perl ORM:
> http://dbix-class.shadowcatsystems.co.uk/ +
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060303/13fc69d4/attachment.htm
More information about the Catalyst
mailing list