[Catalyst] UTF-8 strings getting stragely converted to latin1 when coming from MySQL DB

Daniel McBrearty danielmcbrearty at gmail.com
Thu Mar 2 16:49:13 CET 2006


may not be related to your problem, but make sure you are issuing the "set
names utf8" command to mysql at teh start of the session. This has bit my
ass and caused me much headaches in the past ...


http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html

if you don't do this, mysql may take it upon itself to convert streams to
some non utf8 form, even though you think you have told it really thoroughly
that it shouldn't.



On 3/2/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
>
> On Thu, Mar 02, 2006 at 04:35:37PM +0100, Michele Beltrame wrote:
> > Hello!
> >
> > I'm experiencing a problem with a Catalyst 5.65 installation under
> > Ubuntu Linux 5.10. All the tables on the MySQL database are marked
> > UTF-8, and the collation is utf8_general (as I always set it).
> >
> > I'm using DBIx::Class, and I loaded the Unicode plugin in Catalyst.
> > However, when I read something from the SQL database, the string gets
> > converted to latin1, so the accents (widely used in the Italian
> > language) are not readable anymore - well, unless I switch the pages to
> > latin1, but I'd like to use UTF-8.
>
> A prototype of a DBIx::Class::UTF8Columns component was posted to the
> dbix-class list today.
>
> http://lists.rawmode.org/pipermail/dbix-class/2006-March/000837.html
>
> --
>      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/20060302/cf69d770/attachment.htm 


More information about the Catalyst mailing list